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
"ad" <fl****@wfes.tcc.edu.tw> wrote in message
news:uy**************@TK2MSFTNGP15.phx.gbl...
I want to sent mail by program: smtpmail.send(Mail)
But it fail when the mail server need authentication.
How can I do?