【问题标题】:Not allow to send email on behalf of my client on office365不允许在 office365 上代表我的客户发送电子邮件
【发布时间】:2018-01-12 00:16:12
【问题描述】:

我已尝试使用我的客户从地址 (info@myclient.com) 向我客户的客户发送电子邮件。 我的客户已经通过 SPF 将我的 smtp 服务器配置到他们的域中。 以下是为发送电子邮件而编写的 C# 代码。

 MailMessage mail = new MailMessage();
 //set the addresses           
 mail.From = new MailAddress("info@mycient.com");
 mail.To.Add("krishna.menan@gmail.com");
 mail.Subject = "This is an email";
 mail.Body = "this is a sample body with html in it. <b>This is bold</b> 
<font color=#336699>This is blue</font>";
 mail.IsBodyHtml = true;
 SmtpClient smtp = new SmtpClient();
 System.Net.NetworkCredential networkCredentialRFE = new 
 System.Net.NetworkCredential("kirshna@mycomapny.com", "Password123");
  smtp.Credentials = networkCredentialRFE;
 smtp.Host = "outlook.office365.com";
 smtp.EnableSsl = true;
 smtp.Port = 587; 
 smtp.Send(mail);

以下是我得到的错误: 信箱不可用。服务器响应为:5.7.60 SMTP;客户端无权作为此发件人发送

【问题讨论】:

    标签: c# email office365 exchange-server


    【解决方案1】:

    确保您使用的任务用户具有适当的“发送为”权限,请参阅“Give mailbox permissions to another user in Office 365 - Admin Help”。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-03-07
      • 2022-07-17
      • 1970-01-01
      • 2017-10-12
      • 2013-04-03
      • 2012-11-20
      • 2020-04-26
      • 2018-09-11
      相关资源
      最近更新 更多