?
Solved

SQL Database Mail Office 365 Access error

Posted on 2014-01-14
6
Medium Priority
?
1,755 Views
Last Modified: 2014-03-05
Since moving over to Office 365 our SQL Database Mail has stopped running. At first i thought i knew what this problem was. As we no longer used our on site exchange server as everything is now running via Office 365. I would simply have to replace the local SMTP path, port to the online Office 365 path. Along with the correct email account and password.

I've logged onto the Office 365 admin portal and retrieved the correct SMTP path entered the path in the SQL Database Mail Configure page, ran a test email but nothing happens. The error i can see within the database mail log is as follows:

Message
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 18 (2014-01-14T09:24:37). Exception Message: Could not connect to mail server. (An attempt was made to access a socket in a way forbidden by its access permissions 132.245.194.249:587).
)

Any advice would be appreciated.
0
Comment
Question by:rutc2008
  • 3
  • 2
6 Comments
 
LVL 37

Expert Comment

by:Jian An Lim
ID: 39781276
it mainly because firewall blocking/inspecting the traffic hence stop it.
0
 

Author Comment

by:rutc2008
ID: 39781740
Thanks for the response. I'll get our firewall guys to have a look. I'll let you know what they tell me.
0
 
LVL 74

Expert Comment

by:Jeffrey Kane - TechSoEasy
ID: 39892183
You cannot just point the settings in your SQL app to Office 365 because SQL will not send out via TLS as required by Office 365.

So, instead, you need to configure an SMTP relay.  Follow this article to do just that:
http://blogs.msdn.com/b/momalek/archive/2013/02/25/how-to-configure-sql-database-mail-so-send-emails-using-office-365-exchange-online-a-walkthrough.aspx

Jeff
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 

Accepted Solution

by:
rutc2008 earned 0 total points
ID: 39894463
Thanks for all the advice guys. Turned out our mail filtering provider was blocking the public IP address of our exchange server from relaying SMTP requests. As soon as they allowed SMTP requests to go through. The heavens literally opened.

Thanks again.

Paya
0
 
LVL 74

Expert Comment

by:Jeffrey Kane - TechSoEasy
ID: 39896479
you never said you had an onsite Exchange Server... so no way we could have known how to help.
0
 

Author Closing Comment

by:rutc2008
ID: 39905876
Figured it myself :)
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

There are times when we need to generate a report on the inbox rules, where users have set up forwarding externally in their mailbox. In this article, I will be sharing a script I wrote to generate the report in CSV format.
With its various features, Office 365 can not only help you with your day-to-day business tasks, it can also do wonders for your marketing campaign.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

840 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