Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manage more recipients and SmtpCommandException. #185

Closed
Didacuss opened this issue May 12, 2015 · 1 comment
Closed

Manage more recipients and SmtpCommandException. #185

Didacuss opened this issue May 12, 2015 · 1 comment
Labels
invalid This doesn't seem right

Comments

@Didacuss
Copy link

Hi, I have this question.
In my message, there are two recipients, one has a correct email address and the other has an incorrect email address. So I aspect that Send method raises an exception but it’s not true, furthermore I see that SmtpCommandException has a MailBox property that:

“This property will only be available when the MailKit.Net.Smtp.SmtpCommandException.ErrorCode value is either MailKit.Net.Smtp.SmtpErrorCode.SenderNotAccepted or MailKit.Net.Smtp.SmtpErrorCode.RecipientNotAccepted and may be used to help the user decide how to proceed.”

However, if there are more emails incorrect ? Where can I find this information?

Thanks in advance.
Regards
Diego Parolin.

@Didacuss Didacuss changed the title Manage more recipient and SmtpCommandException. Manage more recipients and SmtpCommandException. May 12, 2015
@jstedfast
Copy link
Owner

If the addresses are wrong and you are not getting an exception, then that suggests that the SMTP server is not returning an error when MailKit sends the RCPT TO commands.

To verify this, you can try getting a protocol log.

As far as there only being a single MailboxAddress on SmtpCommandException: that's because of the way the SMTP protocol works. A RCPT TO command is sent for each recipient and the first recipient that fails, the exception gets thrown and the address that failed is stuffed into the SmtpCommandException.

@jstedfast jstedfast added the invalid This doesn't seem right label May 19, 2015
Repository owner deleted a comment from gbrunton May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants