Error conditions

The command SimpleMail fails if the mail server reports an invalid recipient. In that case, the mail message will not be sent. This is the safest approach, because it does not ignore errors.

If you want to send mail to a list of recipients, some valid and some invalid ones, you should use a separate SimpleMail command for each recipient and handle possible errors.

Note

The command SimpleMail only validates recipients against the local mail server. This will catch errors like badly formatted e-mail addresses, but it will not catch "remote" errors, like non-existent remote addresses. In other words, the validation does not guarantee that a message will be delivered at the destination.