Member_2_7717371
asked on
SQL Database Mail is failing in the middle of a procedure (or Agent job)
We are having an issue on our SQL server where jobs that send out a lot of emails send some emails but not all of the them. In going through the logs the emails are sending fine and report 'Mail successfully sent' and then all of a sudden the error comes up with 'The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2017-09-18T12:16:43). Exception Message: Cannot send mails to mail server. (The operation has timed out.).). It seems to fail at different intervals.
On the failure emails, the last_mod_user in the sysmail_event_log is 'sa' and the account_id is NULL. However, on the successfully sent emails, the last_mod_user is 'DOMAIN\Administrator' and the account_id is 1. It almost appears as if the Administrator looses connection and then the mail starts failing thereafter.
The same activity seems to happen regardless of running the proc manually or having the agent job initiate it.
The mail settings are (we use AuthSMTP.com to send):
Server Name: mail.authsmtp.com
Port: 2525
SSL: required
Basic Authentication with our AuthSMTP credentials.
Database Mail Executable Minimum Lifetime (seconds) = 600
Does anyone know why this would occur?
Thank you.
On the failure emails, the last_mod_user in the sysmail_event_log is 'sa' and the account_id is NULL. However, on the successfully sent emails, the last_mod_user is 'DOMAIN\Administrator' and the account_id is 1. It almost appears as if the Administrator looses connection and then the mail starts failing thereafter.
The same activity seems to happen regardless of running the proc manually or having the agent job initiate it.
The mail settings are (we use AuthSMTP.com to send):
Server Name: mail.authsmtp.com
Port: 2525
SSL: required
Basic Authentication with our AuthSMTP credentials.
Database Mail Executable Minimum Lifetime (seconds) = 600
Does anyone know why this would occur?
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER