Re: SMTP strange problems - delphi6 + indy10 + gmail.com account ( SSL )

Giganews Newsgroups
Subject: Re: SMTP strange problems - delphi6 + indy10 + gmail.com account ( SSL )
Posted by:  Aquinease (ignorethispartseanho…@ignorethispartoohotmail.com)
Date: Thu, 14 Dec 2006

"emilvv" <emil…@gmail.com> wrote in message
news:3E5C72948D0DE340emil…@gmail.com...
>I have a problem with SMTP with SSL support for GMAIL account.
> The code is working, BUT working once - i mean when i send an email
> successfuly and try to send second
> mail it is unsuccessful - mail is not arrive.
>
> IF i send other email to other account ( POP3 ) with no SSL support and
> try to send
> again email with gmail account ( SSL ) it is working again , but again for
> one email ....
>
> Here is my code ...
>
> Please helm me !!!
> Thanks in advance
>
> Emil
>
>  EmailMessageToSend.Clear;
>  EmailMessageToSend.From.Address := ......
>  EmailMessageToSend.Recipients.EMailAddresses := ......
>  EmailMessageToSend.CCList.EMailAddresses := .......
>  EmailMessageToSend.BccList.EMailAddresses := ........
>  EmailMessageToSend.Subject := ..........
>  EmailMessageToSend.Priority := ...............
>  EmailMessageToSend.Body.Assign ( memoTempEmail.Lines );
>
> ....
> TIdAttachmentMemory.Create ( EmailMessageToSend.MessageParts,
> FileBlob ).FileName := ''filename.txt' ....
>
> SMTP.Host := .......
> SMTP.Port := '465';
>
> SMTP.Username := 'username'
> SMTP.Password := 'password'
>
> SMTP.IOHandler := sslSMTP;
> SMTP.UseTLS := utUseImplicitTLS;
>
> SMTP.Connect;
>
> if SMTP.Connected then begin
>    ShowStatus ( 'Connected ...' );
>    ShowStatus ( 'Sending ...' );
>  end
>  else begin
>    ShowStatus ( 'Failed on connect ...' );
>    exit;
> end;
>
> SMTP.Send ( EmailMessageToSend );
>
> if SMTP.Connected then SMTP.Disconnect;

Not sure if you solved your problem or not, but can you also include the
part of your code where you initialize your sslSMTP instance?

Replies

None

In response to

SMTP strange problems - delphi6 + indy10 + gmail.com account ( SSL ) posted by emilvv on Mon, 30 Oct 2006