Exchange | Exchange Server | Development
The process of building custom applications and tools that interact with Microsoft Exchange Server
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
Last line is in error. How to correct it and have cc list as well?
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2013_SP1); service.Credentials = new WebCredentials("...[@](/users/na/?userId=06f58d19-7ffe-0003-0000-000000000000).com", "???"); service.Url = new Uri("https://outlook.office365.com/EWS/Exchange.asmx"); EmailMessage message = new EmailMessage(service); // Set properties on the email message. message.ToRecipients.Add("test[@](/users/na/?userId=a28c79c1-c609-48db-b55f-1783d1187afb).com"); ... message.ToRecipients = Email;
If Email is a string or an EmailAddress object, then try message.ToRecipients.Add(Email) and message.CcRecipients.Add(EMail).