I have gone through the answer to the below question and found it to be very helpful. However, I have a different question regarding the behavior of smtp servers. Mailbox unavailable and Relay configuration
Scenario: I have two smtp servers which I do not have access to i.e. just the credentials. While sending email from 1 server I receive the below error:
Mailbox unavailable. The server response was: 5.7.1 Unable to relay
Type: System.Net.Mail.SmtpFailedRecipientException:
Source:System
Stack Trace: at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, Boolean allowUnicode, SmtpFailedRecipientException& exception) at System.Net.Mail.SmtpClient.Send(MailMessage message)
is very clear i.e. the smtp server was unable to relay the message. However, on other server the SendEmail method did not throw any exception but I received a Mailer Daemon Email message stating that :
This is the mail system at host test.relay.host.name.changed.
I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can delete your own text from the attached returned message.
The mail system
test1.test2@hotmail.com: host mx3.hotmail.com[xx.xx.xx.xxx] said: 550 Requested action not taken: mailbox unavailable (in reply to RCPT TO command)
Question:
- Why the different behaviors? i.e. in one case I receive mailer daemon message whereas in other an exception in SendEmail method?
Also,
- To be specific how do mailer daemon messages work? Because as per the second message it seems it was the relay that sent it.
- If this is a configuration difference then what are they?