Is there an API Event when a message is rejected?

Discussion for developers using MailEnable.
Post Reply
demand-soft
Posts: 6
Joined: Thu May 08, 2008 11:17 pm
Location: Vancouver, WA, USA

Is there an API Event when a message is rejected?

Post by demand-soft »

I’m attempting to integrate with the MailEnable system so that when a message is rejected for various reasons from the receiving mail server I can capture it programmatically.

For example I have a program that sends out emails via a specific mailbox. The messages are created and sent via asp.net (system.net.mail.MailMessage object). Message is created and the application log into the MailEnable system via a mailbox account and sends the mail message out.

Then a few minutes later the mailbox gets a Delivery Subsytem message saying that the message was not delivered for various reasons.

Here is an example of the Delivery Sybsystem message:

MailEnable: Message could not be delivered to some recipients.
The following recipient(s) could not be reached:

Recipient: [SMTP:scouterroger@verizon.net]
Reason: Remote SMTP Server Returned: 550 5.1.1 unknown or illegal alias: scouterroger@verizon.net



Message headers follow:




I want to capture when this happens and run a script. Is that possible?
Shane

Post Reply