PowerTCP Mail for .NET
GetDefaultPort Method (Smtp)




The MailSession to use for determining the port.
Returns the port normally used for the supplied MailSession configuration.
Syntax
Public Shared Function GetDefaultPort( _
   ByVal session As SmtpSession _
) As Integer
Dim session As SmtpSession
Dim value As Integer
 
value = Smtp.GetDefaultPort(session)
public static int GetDefaultPort( 
   SmtpSession session
)
public: static int GetDefaultPort( 
   SmtpSession* session
) 
public:
static int GetDefaultPort( 
   SmtpSession^ session
) 

Parameters

session
The MailSession to use for determining the port.

Return Value

The port normally used for the supplied MailSession configuration.
Remarks

Returns 587 (the well-known SMTP submission port) if SmtpSession.UseSubmissionPort is true, and 25 (the well-known SMTP server port) if false. If MailSecurity.Encrypt == Encrypt.Implicit, returns 465 (the well-known secure SMTP port).

Used to initialize Session.RemoteEndPoint.Port if not initialized by the user.

See Also

Reference

Smtp Class
Smtp Members


PowerTCP Mail for .NET Documentation Version 4.3
© 2018 Dart Communications. All Rights Reserved.
Send comments on this topic