I recently had the requirement to send out multiple emails from my OWA account. Being a lazy person, I deceided that it would be better to automate the process instead than send it one at a time.
Here is the code I generated to quickly send a test email from the account. The OWA site is https://mail.myowa.com.au/owa.
static void Main(string args)
ExchangeService service = new ExchangeService();
service.Credentials = new WebCredentials("username", "password", "domain");
service.Url = new Uri(@"https://mail.myowa.com.au/EWS/Exchange.asmx");
EmailMessage message = new EmailMessage(service);
// Add properties to the email message.
message.Subject = "Test Subject";
message.Body = new MessageBody()
BodyType = BodyType.HTML,
Text = "<b>Test content in bold</b>"
// Send the email message and save a copy.