Board index » delphi » problem with TIdSMTP
Rômulo Nascimento
Delphi Developer |
Rômulo Nascimento
Delphi Developer |
problem with TIdSMTP2004-06-16 05:56:09 AM delphi255 Hello, When I use the TIdSMTP component I received the error message "5.5.4 Invalid Address". Can anybody help??? Thanks. |
Remy Lebeau (TeamB)
Delphi Developer |
2004-06-16 05:57:18 AM
Re:problem with TIdSMTP
"Rômulo Nascimento" <XXXX@XXXXX.COM>writes
QuoteWhen I use the TIdSMTP component I received "atozedsoftware.indy.protocol.smtp" newsgroup. This very issue was just discussed a couple of days ago. Gambit |
Roberto Colpani
Delphi Developer |
2005-07-06 02:54:34 PM
Re:problem with TIdSMTP
I have done a small application that when it is showed it send some email and
then it close. TheSource is: procedure TForm1.FormShow(Sender: TObject); Var strMsg: String; begin Mail.Host := 'pop.something.it'; Mail.Username := 'XXXX@XXXXX.COM'; Mail.Password := 'APassword'; try Mail.Connect; MailMessage.From.Name := 'ASubject'; MailMessage.Subject := '<autorun>'; MailMessage.Body.Insert(0,'This is a autogenerate message.'); MailMessage.ReceiptRecipient.Address := 'XXXX@XXXXX.COM'; MailMessage.Recipients.EMailAddresses := 'XXXX@XXXXX.COM'; Mail.Send(MailMessage); MailMessage.ReceiptRecipient.Address := 'XXXX@XXXXX.COM'; MailMessage.Recipients.EMailAddresses := XXXX@XXXXX.COM'; Mail.Send(MailMessage); finally Mail.Disconnect; end; Application.Terminate; end; When the application run the first time it is all ok, but when I am try a second time an error of this kind: 'EIdSocketError with message 'Socket Error # 10053 software caused connection abort', occur at the row "Mail.Connect". Someone can help me? XXXX@XXXXX.COM |
SupportX
Delphi Developer |
2005-07-06 04:02:20 PM
Re:problem with TIdSMTP
Subject: RE: problem with TIdSMTP
Perhaps calling application.terminate causes the problem because the application may be terminating before connection is actually closed. This could also lead to an account lockup in your ISP. Try doing this: . . finaly ... end; repeat Application.ProcessMessages; until Mail.Disconnected; Close; end; I am not sure that is the problem, but worth while trying. Good luck, SupportX |
Roberto Colpani
Delphi Developer |
2005-07-06 04:25:00 PM
Re:problem with TIdSMTP
"SupportX" <XXXX@XXXXX.COM>ha scritto nel messaggio
QuoteSubject: RE: problem with TIdSMTP |
SupportX
Delphi Developer |
2005-07-06 05:26:37 PM
Re:problem with TIdSMTP
Subject: RE: Re: problem with TIdSMTP
Right, Use: until not Mail.Connected |
Roberto Colpani
Delphi Developer |
2005-07-07 02:48:02 PM
Re:problem with TIdSMTP
"SupportX" <XXXX@XXXXX.COM>ha scritto nel messaggio
QuoteSubject: RE: Re: problem with TIdSMTP |