Indy 9 and SMTP Authentification

Giganews Newsgroups
Subject: Indy 9 and SMTP Authentification
Posted by:  Tom Hahn (tha…@hahntech.com)
Date: Wed, 27 Oct 2010

I'm confused about how to do login authentication with Indy 9. Assuming
that the AuthentificanType is set to atLogon, and the UserName and
Password are entered,  should the following code be used (with error
handling):

Try
SMTP.Connect;
SMTP.Authenticate; // some examples include this, others don't
SMTP.Send;
Finally
SMTP.Disconnect
End;

Should there be a test to see if authenticated after Authenticate?
Does an authentication failure raise an error?

Is it possible to use SSL authentication with Indy 9?
If so, how?

TIA,
Tom

Replies