Connecting SQL Server 2005 to Exchange 2003 without SMTP?
I'm working for an organization that has locations all over the country. Our Exchange servers are not "local" to where I am working, and getting an audience with the Exchange administrator is as tough as getting an audience with the king of Tazmania. He is VERY busy.We have Outlook 2007 on every desktop (which works flawlessly). The server we connect to is Exchange 2003. At some point in the past few months, the Exchange admin created an email account specifically for our SQL server. (ie. SQLMessenger@MyDomain.com). We went into our SQL Console and plugged in the exact same information that we have in Outlook, save the account name and password. It failed.I tried the traditional EHLO/HELO test on Telnet from a command prompt, and tried to telnet to port 25 on the Exchange server. I instantly received the error "Could not open connection to the host, on port 25: connect failed". I've had a few tech folks here tell me that our Exchange server doesn't use SMTP interanally, and a few others tell me it does. I have a lot of experience with email servers, but not Exchange. Are there any Exchange admins who can give me some guidance on getting this set up? I'm using the Database Mail Configuration Wizard on SQL Server which should allow me to send messages through Exchange as if it were an SMTP client. It will allow me to change the SMTP port.
March 12th, 2010 7:39pm

Guerialla tactics:Ask around and see if they have any of those Multi-Function printer/copiers that can send email. If they do, check the config on one of them, and try using whatever they're using.
Free Windows Admin Tool Kit Click here and download it now
March 12th, 2010 7:49pm

That was a good suggestion!Unfortunately we are a little archaic here. No multifunction printers or copiers whatsoever. I'm trying to get the secretary to stop ordering carbon paper.
March 12th, 2010 8:18pm

Any chance they'd have any back at the central site? If they do, you might try having someone email you a document from one of them, and then check the headers on the email to see what it used for a relay. They have to have an smtp relay there somewhere.
Free Windows Admin Tool Kit Click here and download it now
March 12th, 2010 8:28pm

Thanks for helping mjolinar. I didn't get to ask anyone at "HQ" if they had one but after two days of hunting I did figure the problem out! SQL Server has an additional role that has to be gien to the account or it won't send mail. I looked in four books and it's not mentioned, but it IS mentioned on a SQL developer site here on MSDN.http://msdn.microsoft.com/en-us/library/ms177215.aspx "To send Database Mail you must be a member of the DatabaseMailUserRole database role in the msdb database."I had to add the email account to this role in SQL server, then recreate the mail account from scratch. It's not an Exchange communication problem at all. I'm posting it here in case someone else comes along wondering how SQL and Exchange communicate. The role is obscure and buried, but at least in our environment it won't work without it.To add the role, you open SQL Server Management Studio.Expand:+ Database+ System Databases+ msdb + Security+ Roles+ Database Roles> DatabaseMailUserRole > Properties > Generaladd the user.Or, open SQL Server Management StudioExpand: + Security+ LoginsRight click Logins, Select> New LoginOn the "General Page" Add a new user (do a search to make sure you have it spelled right)On the User Mapping page check msdb (on the right pane) then check DatabaseMailUserRole in the bottom pane.Create the Mail Profile after you finish this. If you don't know how, search out instructions for using the SQL Database Mail Configuration Wizard. (like: http://msdn.microsoft.com/en-us/library/ms175951.aspx )I used the second method.
March 12th, 2010 10:23pm

FWIW, I just finished helping our DBA set up some email alerts on a couple of our SQL servers. The alerts were being sent to a text pager and were coming through way ugly. We gave up on those, and had the alert trigger run a powershell script and had that send the email and it worked a lot better.
Free Windows Admin Tool Kit Click here and download it now
March 12th, 2010 10:35pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics