Trying multiple SMTP servers

delphi package - automated exception handling
Post Reply
sonofscruffy
Posts: 3
Joined: Tue Nov 22, 2005 9:47 pm

Trying multiple SMTP servers

Post by sonofscruffy »

Is it possible to attempt to send the exception email thru a local SMTP service and if that service is unavailable for some reason, get an indication of the fact to switch to a company central SMTP service?
Thank You.

Gary
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

You can use RegisterExceptActionHandler to be notified when madExcept wants to send the email. In that moment you can do your own processing. You can then use madExcept's "SendSmtpMail" function. If it fails, simply call it again with different parameters.
Post Reply