Solved

Sending email with sp_send_cdosysmail failed after IP change

Posted on 2008-09-29
4
568 Views
Last Modified: 2012-06-21
I changed the IP addresses on my SQL and Exchange servers this morning and now my SP to send email doesn't work. The SP containes a reference to the Exchange server but uses it's NetBIOS name and not the IP. The Outlook MAPI profile on the SQL server works fine and it sends email through the Exchange server. Nothin else has changed apart from the IP address being altered, and both servers are on the same subnet with their new addresses.

Has anyone come across this before? Is there a setting in SQL where I would stipulate the IP address of the Exchange server, as I can't locate it? Eventwvr on both servers shows no entries for failed SPs or emails being backed up. THe Exchange server queue is flowing just fine, so I'm stumped.

All advice appreciated.
0
Comment
Question by:guswebb
  • 3
4 Comments
 
LVL 29

Expert Comment

by:mass2612
ID: 22594945
Hi,

Have you restarted SQL? You could also try adding the IP address rather than using the NetBIOS name just as a test to see if that works. If it does then SQL is caching the IP address and not doing a lookup to see the new IP with the NetBIOS name.
0
 
LVL 9

Author Comment

by:guswebb
ID: 22595651
Yes, I have rebooted both servers twice since making the changes.

Changing the NetBIOS name in the SP for the IP address of the Exchange server doesn't make any difference. I restarted SQL after making the change so tht I could test this.

In Enterprise Manager/Support Services/SQL Mail, where I select the MAPI profile to be used I get an error (this happened prior to testing using IP as above, but has only started appearing since changing the IP address of the SQL server). The error is...

Error 18025: xp_test_mapi_profile : failed with mail error 0x8004011

Looking at the properties of the xp_test_mapi_profile Extended SP all I can see is the Path which is sqlmap70.dll.

Any ideas where I should be looking next?
0
 
LVL 9

Author Comment

by:guswebb
ID: 22596043
I've got past the MAPI profile error by recreating the profile and also reassigning the log on account information for MSSQL and SQLSERVERAGENT. I still cannot send email using the sp_send_cdosysmail stored procedure.

Any more ideas?
0
 
LVL 9

Accepted Solution

by:
guswebb earned 0 total points
ID: 22598054
I found the solution. It was to do with the SMTP server Relay permission's where I had listed a range of IP address that are authorised to send email via the SMTP virtual server. This list included my old IP subnet and so needed to be updated for the new IP range.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now