Authentication mechanism used against the SMTP server.
By default EmailMessage.SmtpAuthentication = SmtpAuthentication.AuthLogin
[C#]
EmailMessage msg = new EmailMessage( "mail.myCompany.com");
msg.Subject = "Order Confirmation";
msg.To = "you@yourcompany.com";
msg.From = "me@myCompany.com";
//logging for easier troubleshooting
msg.Logging = true;
msg.LogPath = "c:\\email.log";
//set the plain text body
msg.Body = "the email body contents go here...";
//set the authentication
msg.SmtpAuthentication = SmtpAuthentication.AuthLogin;
msg.Username = "username";
msg.Password = "secret";
msg.Send();
[VB.NET]
Dim msg As New EmailMessage("mail.myCompany.com")
msg.Subject = "Order Confirmation"
msg.To = "you@yourcompany.com"
msg.From = "me@myCompany.com"
'logging for easier troubleshooting
msg.Logging = True
msg.LogPath = "c:\email.log"
'set the plain text body
msg.Body = "the email body contents go here..."
'set the authentication
msg.SmtpAuthentication = SmtpAuthentication.AuthLogin
msg.Username = "username"
msg.Password = "secret"
msg.Send()
| Member Name | Description |
|---|---|
| AuthLogin | Uses the AUTH LOGIN mechanism. |
| AuthPlain | Uses the AUTH PLAIN mechanism. |
| CramMD5 | Uses the Cram-MD5 mechanism for authentication. |
Namespace: aspNetEmail
Assembly: aspNetEmail (in aspNetEmail.dll)