A ad Oct 9, 2005 #1 I want to sent mail by program: smtpmail.send(Mail) But it fail when the mail server need authentication. How can I do?
I want to sent mail by program: smtpmail.send(Mail) But it fail when the mail server need authentication. How can I do?
F Frankie Oct 9, 2005 #2 Add these lines to your code before you call SmtpMail.Send() mailMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); //basic authentication mailMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", myLoginID); //set your username here mailMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", myPassword); //set your password here -HTH
Add these lines to your code before you call SmtpMail.Send() mailMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); //basic authentication mailMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", myLoginID); //set your username here mailMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", myPassword); //set your password here -HTH