Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 686
  • Last Modified:

MSSQL dbMail and remote SMTP

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?
0
RaneFan
Asked:
RaneFan
  • 5
  • 5
1 Solution
 
RiteshShahCommented:
0
 
RaneFanAuthor Commented:
Thank you. So far, it looks like we've set things up appropriately.

Different than the article above though, we've chosen Basic Authentication in the user profile since this is a remote ISP's SMTP server. But it doesn't look like the password is ever sent - or at least all of the results look like this.

If I set the recipient list to include 'me@OurDomain; You@Yahoo.com', I will get the email and you won't and the above error will be returned.

Is there a switch somewhere that states that the password MUST be sent? I cannot find one at all.
0
 
RiteshShahCommented:
you have to set authenticated id/password in your settings itself.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
RaneFanAuthor Commented:
I apologize, but I'm not certain where you mean that I should set authenticated id/password in the settings.

Mail Profile - I made certain to set the correct name and password in the mail profile, and to the degree that it can send email within the domain, I know that is working.

DBMail Settings - I can't find anything in here to set.

sp_send_dbmail - Is there a parameter in here that I am missing?

Was there ever a patch for a problem in this area? We are using:

Microsoft SQL Server 2005 - 9.00.1399.06 (Intel X86)   Oct 14 2005 00:33:37   Copyright (c) 1988-2005 Microsoft Corporation  Enterprise Evaluation Edition on Windows NT 5.2 (Build 3790: Service Pack 2)
0
 
RiteshShahCommented:
see step 5  under "SQL Server 2005 Management Studio - Database Mail Configuration" in my given link.

select "basic authentication" and give user name, password and confirm password there.
0
 
RaneFanAuthor Commented:
Checked and double checked. Still not working.
0
 
RaneFanAuthor Commented:
Just went through all of the notes for MSSQL 2005 SP1, SP2 and SP3. There doesn't appear to be any issues surrounding SMTP, SMTP authentication or Database Mail that would create this problem.

I put in a call to the ISP to see if they may be blocking Database Mail as a client. It's worth a shot.

I do need to resolve this today so I'll bump the points.
0
 
RiteshShahCommented:
ok, give me the screen shot of the STEP 5, I don't think so there is a problem from your ISP
0
 
RaneFanAuthor Commented:
I sent it to the email address you listed in your profile. I wasn't comfortable placing all that info here.
0
 
RiteshShahCommented:
no problem, I have already sent you answer in your email. It was asking for windows authentication so you need to give windows username, so just remove string after "@" there and keep only username
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now