PowerTCP Mail for .NET
SmtpLoginMethod Enumeration
Example  See Also  Send comments on this topic.
Dart.PowerTCP.Mail Namespace : SmtpLoginMethod Enumeration




Enumerates values of the Smtp.LoginMethod property.

Syntax

Visual Basic (Declaration) 
Public Enum SmtpLoginMethod 
   Inherits System.Enum
Visual Basic (Usage)Copy Code
Dim instance As SmtpLoginMethod
C# 
public enum SmtpLoginMethod : System.Enum 
Managed Extensions for C++ 
__value public enum SmtpLoginMethod : public System.Enum 
C++/CLI 
public enum class SmtpLoginMethod : public System.Enum 

Members

MemberDescription
AuthCramMd5 An "AUTH CRAM-MD5" login is used as described in RFC 2554. Smtp.Username and Smtp.Password must be provided.
AuthLogin An "AUTH LOGIN" login is used as described in RFC 2554. Smtp.Username and Smtp.Password must be provided.
AuthPlain The "AUTH PLAIN" login is used as described in RFC 2245 and 2595. Smtp.Username and Smtp.Password must be provided.
Auto The capabilities of the server will checked and a login method will be chosen in the following order of preference: SmtpLoginMethod.AuthCramMd5, SmtpLoginMethod.AuthLogin, SmtpLoginMethod.AuthPlain, SmtpLoginMethod.None. SmtpLoginMethod.None will always be used if no Username property is provided.
None No login is required.

Example

The following example demonstrates using the DeliveryStatusNotification class to send an email with DSN.
Visual BasicCopy Code
' Be sure to import the namespace by putting "Imports Dart.PowerTCP.Mail"
' at the top of your class.

' Specify a DSN ID to use.
Smtp1.DSN.EnvelopeID = "ID1234567"

' Specify to return the entire message instead of the headers.
Smtp1.DSN.ReturnMessage = True

' Send a DSN on failure or delay.
Smtp1.DSN.Type = DSNType.Delay Or DSNType.Failure

' Send a message
Smtp1.Server = "mail@test.com"
Smtp1.Send("you@test.com", "me@test.com", "Test", "test message")
C#Copy Code
// Be sure to import the namespace by putting "using Dart.PowerTCP.Mail;"
// at the top of your class.

// Specify a DSN ID to use.
smtp1.DSN.EnvelopeID = "ID1234567";

// Specify to return the entire message instead of the headers.
smtp1.DSN.ReturnMessage = true;

// Send a DSN on failure or delay.
smtp1.DSN.Type = DSNType.Delay | DSNType.Failure; 

// Send a message
smtp1.Server = "mail.test.com";
smtp1.Send("you@test.com", "me@test.com", "Test", "test message");

Remarks

Some servers support a login mechanism that authenticates each user.

Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         Dart.PowerTCP.Mail.SmtpLoginMethod

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

Documentation Version 3.2
© 2010 Dart Communications. All Rights Reserved.