IdSMTP.Connect;
Try
IdSMTP.Send(IdMessage);
Finally
IdSMTP.Disconnect;
End;
Bjarne
Coordinate your email-newsletters with NTS eBlast tool suite
http://www.go2nts.com/eblast
-----Original Message-----
From: Rainer von Saleski <[email protected]>
To: [email protected]
Sent: Mon, Feb 28, 2011 9:09 am
Subject: How do I know when Indy's SMTP is done sending?
Hi,
I'm using SMTP from Indy to send emails in Delphi 7. Works well, except for one
problem: there seems to be no way for the program to know when the email has
been completely sent.
I try monitoring the OnStatus event, but it gets all the way to "Disconnected"
long before the internal buffers have been fully sent. No other events that I
have tried seem to be helpful in this regard either.
So people using the program are happy to close it down before the buffer
clears, and the email never completes sending .. which means it gets rejected
by the receiving server, and never delivered.
I have tried using a timing loop, but some people use the program with DSL, and
it is amazing just how slow DSL can get when there are a lot of other users on
the same street.
What should I be checking to know when the buffers have cleared?
Thanks,
Rainer
_______________________________________________
Delphi mailing list
[email protected]
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi
_______________________________________________
Delphi mailing list
[email protected]
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi