EidSMTPReplyError
Hello
RBuilder 11.08, Windows 7 and Delphi 2010
I am using the RBuiler Wiki example code to capture Email errors and Indy10
to send email.
uses
ppEmail,
ppSMTPIndy10,
idSSLopenSSLl,
idReplySMTP;
procedure TRBReportRequestLetter.FormCreate(Sender: TObjecct);
begin
with ppReport1 do
begin
TppEmail(ppReport1.Email).SMTP.OnEmailError := EmailErrorEvent;
end;
end;
procedure TRBReportRequestLetter.EmailErrorEvent(Sender: TObject;
aErrorText: String);
begin
showmessage(aErrorText);
end
The problem is that I am trying to capture EIdSMTPReplyError exception class
messages that would display for example if the email recipent's domain was
incorrect. These messages do not display in the EmailErrorEvent but they do
display in the debugger exception notification window when the program is
run inside the Delphi IDE. They also do not display inside a try-except
block surrounding the SendEmail command. Finally, I have been unable to
capture the text messages inside the EmailErrorEvent with any permutations
of code using TidReplySMTP, such as
TidReplySMTP(ppReport1.Email).Text.CommaText.
Could anyone illustrate how to capture the EIdSMTPReplyError messages?
TIA
John
RBuilder 11.08, Windows 7 and Delphi 2010
I am using the RBuiler Wiki example code to capture Email errors and Indy10
to send email.
uses
ppEmail,
ppSMTPIndy10,
idSSLopenSSLl,
idReplySMTP;
procedure TRBReportRequestLetter.FormCreate(Sender: TObjecct);
begin
with ppReport1 do
begin
TppEmail(ppReport1.Email).SMTP.OnEmailError := EmailErrorEvent;
end;
end;
procedure TRBReportRequestLetter.EmailErrorEvent(Sender: TObject;
aErrorText: String);
begin
showmessage(aErrorText);
end
The problem is that I am trying to capture EIdSMTPReplyError exception class
messages that would display for example if the email recipent's domain was
incorrect. These messages do not display in the EmailErrorEvent but they do
display in the debugger exception notification window when the program is
run inside the Delphi IDE. They also do not display inside a try-except
block surrounding the SendEmail command. Finally, I have been unable to
capture the text messages inside the EmailErrorEvent with any permutations
of code using TidReplySMTP, such as
TidReplySMTP(ppReport1.Email).Text.CommaText.
Could anyone illustrate how to capture the EIdSMTPReplyError messages?
TIA
John
This discussion has been closed.
Comments
of the Indy plugin. Send an email to support@digital-metaphors.com if you
would like the patch.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
If there is a patch in 12, I will simply upgrade. If I do so, do I still
use the EMailError event discussed in my initial post or does
EIdSMTPReplyError require a different event handler?
TIA
John
You can use the EmailError event that is used in the RBWiki example. It
will now display the exception message instead of the last command result
which was not giving the correct results.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com