MailMill .NET Class Library

Mail.AuthType Property

Gets or sets an MM_AUTH_TYPE value that specifies the method to be authenticate on the SMTP Server.

public MM_AUTH_TYPE AuthType {get; set;}

Remarks

The AuthType property is used by MailMill during the Send process to specify how to authenticate with the SMTP Server. Please note that the MM_AUTH_TYPE.mmAuthNtlm is not supported in this version of MailMill.
By default, AuthType is set to MM_AUTH_TYPE.mmAuthNone.

Exceptions

Exception Type Condition
ArgumentException AuthType is set with and invalid MM_AUTH_TYPE value.

Example

This sample demonstrates the different authentication method available in MailMill.

Mail oMail = new Mail();
/* 
 * Build the message...
*/
oMail.Server = "mail.mycompany.com";
// No authentication
oMail.AuthType = MM_AUTH_TYPE.mmAuthNone;
oMail.Send();
// Clear Text authentication
oMail.AuthType = MM_AUTH_TYPE.mmAuthBasic;
oMail.AuthLogin = "login";
oMail.AuthPassword = "password";
oMail.Send();

See Also

Mail Class | MailMill Namespace | MM_AUTH_TYPE | AuthLogin | AuthPassword | Send