MSSQL dbMail and remote SMTP
Posted on 2009-04-24
We are slowly migrating away from an ISP. First to go was a specific domain's website (we have several domains) because of the sophisticated application that we wanted to build. We needed full control of the MSSQL server. We left all email services (pop3 and smtp) along with the other websites at the ISP for the moment. Step by step ...
We are now trying to send email from dbmail using SMTP. Our remote ISP server requires authentication for SMTP outside the domain. (FYI - In Outlook, you must set "Outgoing server (SMTP) requires authentication" and "Use same settings as Incoming Server".)
The system states the typical "we do not relay" message.
(Sending Mail using Account 1 (2009-04-23T13:00:40). Exception Message: Cannot send mails to mail server. (Mailbox unavailable. The server response was: 5.7.1 <Customer@TheirDomain.com>... we do not relay <Sender@OurDomain.com>).
If I send within the domain (ie. to Anyone@OurDomain.com) the message works fine. (This also account for why I get most of the SPAM that I get. It comes to me, FROM me. <grrrrr>) So I believe that most of the server config in MSSQL is correct.
Note: The front end of the application was written using php. Manging the backend is now being written with C# and .Net. I was unable to use the standard php mail function because it could not authenticate. We chose to use phpmailer as a solution for this very reason.
Is the problem I am having with MSSQL dbmail similar, or do I just need to configure it properly? If so, where have I gone wrong?