المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : DotNetOpenMail Authentication



C# Programming
10-02-2009, 10:51 PM
Hi

I'm using DotNetOpenMail to send emails frommy .net applications, recently we updated to Exchange 2007 using active directory for authentication. this resulted in all my apps crashing, how do i add authentication to my emails,using the following code i get the error message:

Unrecognized authentication type

is there another way to to the authentication?
thanx in advance http://www.barakasoft.com/script/Forums/Images/smiley_smile.gif



EmailMessage emailMessage = new EmailMessage();
emailMessage.FromAddress = new EmailAddress("admin@ftech.co.za", "SMS Service");
emailMessage.AddToAddress(new EmailAddress("ismail@ftech.co.za"));
emailMessage.AddToAddress(new EmailAddress("Brynn@ftec.co.za"));
emailMessage.Subject = "Company Bulk SMS Billing " + StartDate + " - " + EndDate;
emailMessage.BodyText = @"" + StrEmialBody;
SmtpServer smtpServer = new SmtpServer("pmbex-01");
smtpServer.SmtpAuthToken = new SmtpAuthToken("administrator", "password");

emailMessage.Send(smtpServer);