FireMail gives the option for managing recipients that are rejected by the server. It is important to take care of the refused recipients, as once the recipient is refused, the server will not send a delivery acknowledgement. FireMail provides two ways of handling this issue.
- Terminating the sending of the message
- To throw an exception (SmtpException) when any of the recipient’s addresses gets refused by the server, set the Connection.AllowRefusedRecipient to False (it is True by default).
- Using the AddressRefused event
- This event will be raised, when ever the recipient specified in the To, CC, or BCC is refused and the Connection.AllowRefusedRecipient is True. This event can be setup in two different ways:
If both events are set, first the specific recipient list event will get called, then message event will be called.
If all of the recipients are refused, an exception is generally thrown by the mail server, but it is better to avoid this situation using one of the methods mentioned above.
| See Also |
SmtpAuthenticationException Class | RefusedRecipientEventHandler Delegate | SmtpException Class | Programming with FireMail for .NET

