How To…Show Email Errors

Question

“My emails won’t send.  Is there a way to see the error returned by my email server/MAPI client?”

Solution

By default all email errors are caught and suppressed.  Use the TppSMTPCustom.OnEmailError event to capture the error text returned by your email server or MAPI compatible email client.  This event can be accessed from the TppReport object by typecasting the TppReport.Email object as TppEmail.

Download: ShowEmailErrors.zip

Sample Delphi code: