Friday, October 16, 2009, 15:44 - BPOS
Posted by Administrator
Posted by Administrator
string const string SMTPADDRESS= "stp.mail.emea.microsoftonline.com";
try
{
MailMessage mail = new MailMessage();
mail.from = new MailAddress("from@company.be");
mail.To.Add("customer1@company.be");
mail.To.Add("customer2@company.be");
mail.Subject = "Mail sent using BPOS SMTP relay";
mail.Body= "This mail has been sent using ssl";
SmtpClient smtpServer = new SmtpClient(SMTPADDRESS)
smtpServer.Port = 587;
//TODO: put these configurations in config files.
smtpServer.Credentials = new System.Net.NetworkCredentials("from@company.be","password");
smtpServer.EnableSsl = true;
smtpServer.Send(mail);
return true;
}
catch(Exception ex)
{
return ex.ToString();
}
http://msdn.microsoft.com/en-us/library ... ssage.aspx
http://msdn.microsoft.com/en-us/library ... lient.aspx




( 3 / 800 )

Tom Van Gaever - Blog
If you want to use the Microsoft Online Services Single Sign in tool. Check the C:\Program Files\Microsoft Online Services\Sign In\SignIn.exe.config file first!
Avatar






