Quantcast
Channel: Aspose.Email Product Family
Viewing all articles
Browse latest Browse all 1367

Office365. How to send email with my header?

$
0
0
Hi,

I need to add my header in mail message.
I use Office365 and try to do it by Aspose.Email:

string url = @"https://outlook.office365.com/EWS/Exchange.asmx";
string name = "exchange@office365.com";
string pass = "pass";

Aspose.Email.Exchange.IEWSClient ewsClient = Aspose.Email.Exchange.EWSClient.GetEWSClient(url, name, pass);

Aspose.Email.Mail.MailMessage mailMessage = new Aspose.Email.Mail.MailMessage(name, "myemail@www.com", "Test", "Where is my header??");

mailMessage.Headers.Add("MyHeader", "MyInfo");
ewsClient.Send(mailMessage);


It looks very simple but doesn't work.
I receive email wihtout "MyHeader".

How can I add "MyHeader" to email and send it by Office365 ?

Thanks.

Viewing all articles
Browse latest Browse all 1367

Latest Images

Trending Articles



Latest Images