|Subject:||Re: Delphi 2007, IdSMTP and google mail|
|Posted by:||Remy Lebeau \(Indy Team\) (firstname.lastname@example.org)|
|Date:||Sun, 3 May 2009|
"fabio codebue @ gestionaleopen" <fabio.codeb…@gestionaleopen.org> wrote in
> IdSSLIOHandlerSocketOpenSSL.Destination:= v_smtp_server.Text;
> IdSSLIOHandlerSocketOpenSSL.Port:= strtoint(v_smtp_porta.Text);
You do not need to set those manually.
> // IdSMTP.SASLMechanisms:= ;
> IdSMTP.UseTLS:= utNoTLSSupport;
By doing that, SSL will be disabled, and thus there is no need to use
TIdSSLIOHandlerSocketOpenSSL at all.
> v_mail.From.Address:= v_smtp_utente.Text;
> v_mail.From.Name:= v_mittente.Text;
> v_mail.From.Text:= v_mittente.Text;
By setting the Text property, you erase the previous values assigned to the
Name and Address properties. Set either Name/Address or Text, not all three
> if IdSMTP.Authenticate then
Send() calls Authenticate() internally for you, and will raise an exception
if authentication fails.
> after IdSMTP.Connect I have back message connected and wait forever...
Then you did not set up the TIdSMTP properties correctly, and thus it ends
up waiting for data that never arrives from the server.
> I try to change IdSMTP.AuthType with atSASL, atDefault... I try
> to send to standard pop3 server without problems...
The AuthType property has nothing to do with your problem. You did not set
up the Host/Port/IOHandler/UseTLS properties correctly.
Remy Lebeau (Indy Team)
Delphi 2007, IdSMTP and google mail posted by fabio codebue @ gestionaleopen on Tue, 28 Apr 2009