I want to send notifications on:
- Success
- Failure
- Delay
when I send my emails.
Unfortunately, it seems like the DeliveryNotificationOptions enumeration doesn't include an option to do all of these:
+---------------+----------------------------------------------------+
| Member Name | Description |
+---------------+----------------------------------------------------+
| Delay | Notify if the delivery is delayed. |
+---------------+----------------------------------------------------+
| Never | A notification should not be generated under |
| | any circumstances. |
+---------------+----------------------------------------------------+
| None | No notification information will be sent. The mail |
| | server will utilize its configured behavior to |
| | determine whether it should generate a delivery |
| | notification. |
+---------------+----------------------------------------------------+
| OnFailure | Notify if the delivery is unsuccessful. |
+---------------+----------------------------------------------------+
| OnSuccess | Notify if the delivery is successful |
+---------------+----------------------------------------------------+
I'm not able to set more than 1 options like this:
Msg.DeliveryNotificationOptions += DeliveryNotificationOptions.Delay;
What other options are there?
The best that I can think of would be to extend MailMessage with an IEnumerable of DeliveryNotificationOptions but I'm not quite sure how I'd use it.
Is this a viable way of doing this?