开发者

Sending mail "on behalf of" in exchange server 2010

开发者 https://www.devze.com 2023-02-03 20:02 出处:网络
I am trying to send a mail using Exchange Server 2010 and System.Net.Mail.SmtpClient.I have given appropriate p开发者_StackOverflow中文版ermission to the user on all the mailboxes. However, the mail s

I am trying to send a mail using Exchange Server 2010 and System.Net.Mail.SmtpClient.I have given appropriate p开发者_StackOverflow中文版ermission to the user on all the mailboxes. However, the mail sending fails ( without any exception in SendAsync method ). Instead, if I give Send As permission on the mailboxes, the mail sending succeeds. Is it possible to send "on behalf of" mails from Exchange Server without using Exchange APIs


MailMessage class exposes two properties: From and Sender

Setting Sender to address1 and From to address2 will send a mail which will read as "address1 on behalf of address2"


MailMessage message = new MailMessage();

message.From = new MailAddress("fromthepersonwho@sentthis.com");
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号