Re: TIdSMTP and SASL

Giganews Newsgroups
Subject: Re: TIdSMTP and SASL
Posted by:  Remy Lebeau (TeamB) (no.spam@no.spam.com)
Date: Fri, 9 Dec 2005

"Iurie Spac" <yuriks…@hotmail.com> wrote in message
news:1CA4E121EAE4E240yuriks…@hotmail.com...

> How to add SASL Entry in  TIdSMTP.SASLMechanisms in runtime

The SASLMechanisms property is a collection.  Like all collections, it has
an Add() method.  In this case, Add() returns a TIdSASLListEntry object.
TIdSASLListEntry has a SASL property that you assign to any TIdSASL-derived
component (TIdSASLCRAMMD5, TIdSASLLogin, etc).  You can then configure the
TIdSASL objects as desired.  Also make sure that the TIdSMTP's AuthType
property is set to atSASL, and the UseEhlo property is set to True.

> and use SASL during autentication?

There is nothing you need to do during the authentication.  Everything is
automated.

> Also i wold like to learn about TIdSMTP SSL/TLS support.

Attach a TIdSSLIOHandlerSocketOpenSSL to the IOHandler property, and
configure as needed.  Also, make sure that the UseTLS property is set to
something other than utNoTLSSupport, such as utUseExplicitTLS.

Gambit

Replies

In response to

TIdSMTP and SASL posted by Iurie Spac on Fri, 9 Dec 2005