Discuss this help topic in SecureBlackbox Forum

SMTP: Login to the server

Before calling Login() method you need to set Username and Password properties. You need to pass the local host name as a parameter to Login() method. The value of the host name is inspected by some (not all) SMTP servers and compared to the name, back-resolved from your client's IP address. If you pass the empty string as a domain name, TElSMTPClient attempts to use the host name determined by back-resolving the local IP address. This might work or not

Examples:

C#:


smtp.Username = "user";
smtp.Password = "pass";

smtp.Login();

Delphi:


smtp.Username := 'user';
smtp.Password := 'pass';

smtp.Login();

If the server supports SASL and there is at least one known mechanism in the server's mechanism list, it will be used first. To enable or disable SASL mechanisms, use SASLMechanism property. Also, it is possible to change the order in which the enabled mechanisms are used. To change this order, use SASLMechanismPriorities property.

Examples:

C#:


smtp.set_SASLMechanism("NTLM", true);
smtp.set_SASLMechanismPriorities("NTLM", 100);

Delphi:


smtp.SASLMechanism['NTLM'] := true;
smtp.SASLMechanismPriorities['NTLM'] := 100;

How To articles about SMTP client

Discuss this help topic in SecureBlackbox Forum