Re: Indy 9 and SMTP Authentification

Giganews Newsgroups
Subject: Re: Indy 9 and SMTP Authentification
Posted by:  Fredrik Sandedal (fredr…
Date: Wed, 27 Oct 2010

Tom Hahn wrote:

> 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

I'm not familiar with Indy 9 but in Indy 10 SMTP.Authenticate is done
automatically in the Send command.
You can use TLS(SSL) by setting the UseTLS property to something else
then utNoTLSSupport. You also need to attach an IOHandler like
TIdSSLIOHandlerSocketOpenSSL to the IOHandler property.




In response to

Indy 9 and SMTP Authentification posted by Tom Hahn on Wed, 27 Oct 2010