Board index » delphi » problem with TIdSMTP

problem with TIdSMTP


2004-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.
 
 

Re:problem with TIdSMTP

"Rômulo Nascimento" <XXXX@XXXXX.COM>writes
Quote
When I use the TIdSMTP component I received
the error message "5.5.4 Invalid Address".
Can anybody help???
Please go to the "news.atozedsoftware.com" server and look at the "5.5.4
Invalid Address" discussion thread in the
"atozedsoftware.indy.protocol.smtp" newsgroup. This very issue was just
discussed a couple of days ago.
Gambit
 

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
 

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
 

Re:problem with TIdSMTP

"SupportX" <XXXX@XXXXX.COM>ha scritto nel messaggio
Quote
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
But there isn't a Disconnected property for the TIdSMTP component!
 

Re:problem with TIdSMTP

Subject: RE: Re: problem with TIdSMTP
Right,
Use: until not Mail.Connected
 

Re:problem with TIdSMTP

"SupportX" <XXXX@XXXXX.COM>ha scritto nel messaggio
Quote
Subject: RE: Re: problem with TIdSMTP

Right,

Use: until not Mail.Connected

It dosn't work. The error still occur. Why?