Question : Unable to relay CRM email

Everything was fine, now all of a sudden:

#61042 - an error occurred while processing the outgoing email message with subject "" for smtp:xx for delivery through "exchange server". System.net.mail.smtpfailedrecipientexception: mailbox unavailable. The server response was: 5.7.1 unable to relay at system.net.mail.smtptransport.sendmail (mailaddress sender mailaddresscollection recipients, string deliverynotify, smtpfailedrecipientexception& exception) at system.net.mail.smtpclient.send(mailmessage message) at microsoft.crm.tools.email.providers.smtppollingsendemailprovider.processmessaginternal (email email message) at microsfot.crm.tools.email.providers.crmpollingsendemailprovider.run()

Any thoughts?

exchange 2007
server 2008
Microsoft CRM Dynamics

Answer : Unable to relay CRM email


1) In VS View -> Output Window (may be it is already open, but for safe side)
2) rewrite you code like this:

replace:

       catch (Exception ex)
        {

        }

with:

           catch (Exception ex)
           {
               System.Diagnostics.Debug.WriteLine(ex.StackTrace);
           }


and then see output window. you will see many lines but the last few lines will be referring the error causing.
Random Solutions  
 
programming4us programming4us