October 8, 2020 at 1:53 pm
We have a new SQL Server 2016 setup that we are migrating our SQL Server 2008 into. We do not have in house SQL admins so we have a consultant doing this work for us. I have an odd behavior with email. I am able to test the Database Email to my work email, and to my personal email and I get the test messages just fine. I set up a job alert to notify my internal address and I receive the notifications just fine when the job completes/fails. But in order to have the consultant test, I need to send alerts/notifications to his work email address, and it seems as soon as the operator has an external address, the notifications no longer work. Since I know the SQL Server can communicate with external email addresses, how can I get job alerts/notifications to external email addresses?
October 8, 2020 at 2:00 pm
Can you add a sql server agent operator?
Then set the job notification to that operator
October 8, 2020 at 2:07 pm
I followed this document to add the operator, and it works just fine when I use my work email, but when I use my personal email I receive nothing and it says the notification never happened in the History:
https://docs.microsoft.com/en-us/sql/ssms/agent/operators?view=sql-server-ver15
October 8, 2020 at 3:36 pm
Check the database mail log.
Database Mail > View Database Mail logs
Its supposed to work fine, are you using your company email? is your company allowing you to send emails to external addresses?
October 8, 2020 at 6:34 pm
I checked the log and it shows a bunch of starting/stopping and that's it. I am able to send a test message to my external address using the Send Test E-Mail... option without issue.
October 8, 2020 at 8:03 pm
Check the database mail log.
is your company allowing you to send emails to external addresses?
In addition to this; your email server might restrict or allow emails to specific domains and those restrictions might be different for the SQL server and your email program. If possible I would check the email server logs. I am not an email server admin but I've worked with email server admins before who have been able to tell me why an email has failed.
I think I'm correct in saying that the SQL server logs will only identify whether the email was succesfully sent to the server. I think it's possible for the email server to subsequently reject the email and this won't show in the SQL log.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply