title: The server response was: 5.7.1 Unable to relay/Mailer Daemon
body: <p>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.
  <a href="https://stackoverflow.com/questions/15717743/mailbox-unavailable-the-server-response-was-5-7-1-unable-to-relay-error">Mailbox unavailable</a>
  and <a href="https://social.technet.microsoft.com/Forums/en-US/1a84a06a-f1c8-40b4-ace8-1e264f218aa1/550-571-unable-to-relay-for?forum=exchangesvrsecuremessaginglegacy" rel="noreferrer">Relay configuration</a></p>
  
  <p><strong>Scenario:</strong>
  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:</p>
  
  <blockquote>
    <p>Mailbox unavailable. The server response was: 5.7.1 Unable to relay</p>
    
    <p>Type: System.Net.Mail.SmtpFailedRecipientException: </p>
    
    <p>Source:System</p>
    
    <p>Stack Trace:    at System.Net.Mail.SmtpTransport.SendMail(MailAddress
    sender, MailAddressCollection recipients, String deliveryNotify,
    Boolean allowUnicode, SmtpFailedRecipientException&amp; exception)    at
    System.Net.Mail.SmtpClient.Send(MailMessage message)</p>
  </blockquote>
  
  <p>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 :</p>
  
  <blockquote>
    <p>This is the mail system at host test.<strong>relay</strong>.host.name.changed.</p>
    
    <p>I'm sorry to have to inform you that your message could not be
    delivered to one or more recipients. It's attached below.</p>
    
    <p>For further assistance, please send mail to postmaster.</p>
    
    <p>If you do so, please include this problem report. You can delete your
    own text from the attached returned message.</p>
    
    <p>The mail system</p>
    
    <p>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)</p>
  </blockquote>
  
  <p><strong>Question:</strong></p>
  
  <ol>
  <li>Why the different behaviors? i.e. in one case I receive mailer
  daemon message whereas in other an exception in SendEmail method? </li>
  </ol>
  
  <p>Also,</p>
  
  <ol start="2">
  <li>To be specific how do mailer daemon messages work? Because as per the
  second message it seems it was the relay that sent it.</li>
  <li>If this is a configuration difference then what are they?</li>
  </ol>