Difference between revisions of "TSmtpCli.Auth"

From Overbyte
Jump to navigation Jump to search
 
Line 9: Line 9:
 
== Description ==
 
== Description ==
  
Sends SMTP command '''AUTH''' to the mail server to start SMTP authentication as specified with [[TSmtpCli.AuthType | property '''AuthType''']].  
+
Sends SMTP command '''AUTH''' to the mail server to start SMTP authentication according property [[TSmtpCli.AuthType | AuthType]].  
If property AuthType has been set to '''smtpAuthAutoSelect''' the component won't silently fall back to smtpAuthNone if no matching authentication method could be detected, instead method [[TSmtpCli.Auth | '''Auth''']] would return with an error > 0 in event [TSmtpCli.OnRequestDone | OnRequestDone]]. Any kind of SMTP authentication requires a previous call of method [[TSmtpCli.Ehlo | Ehlo]] instead of [[TSmtpCli.Helo | Helo]].  
+
If property [[TSmtpCli.AuthType | AuthType]] has been set to '''smtpAuthAutoSelect''' the component won't silently fall back to smtpAuthNone if no matching authentication method could be detected, instead method Auth would return with error > 0 in event [TSmtpCli.OnRequestDone | OnRequestDone]]. Note that any kind of SMTP authentication requires that method [[TSmtpCli.Ehlo | Ehlo]] instead of [[TSmtpCli.Helo | Helo]] has been called previously.
  
 
== Example ==
 
== Example ==

Revision as of 18:08, 19 February 2006

Main page -> ICS component reference -> TSmtpCli.Auth

Definition

procedure Auth;

Inherited from TCustomSmtpCli.Auth

Description

Sends SMTP command AUTH to the mail server to start SMTP authentication according property AuthType. If property AuthType has been set to smtpAuthAutoSelect the component won't silently fall back to smtpAuthNone if no matching authentication method could be detected, instead method Auth would return with error > 0 in event [TSmtpCli.OnRequestDone | OnRequestDone]]. Note that any kind of SMTP authentication requires that method Ehlo instead of Helo has been called previously.

Example

if SmtpCli1.Connected then
    SmtpCli1.Auth;

Best practices

How to