troubleshoot sql server mail problem

How to fix this issue?

Here is error message:

Date  4/21/2014 6:40:00 AM
Log  Job History (Email Notification)

Step ID  1
Server  testabc
Job Name  Email Notification
Step Name  sp99_email_process
Duration  00:00:01
Sql Severity 16
Sql Message ID 17925
Operator Emailed 
Operator Net sent 
Operator Paged 
Retries Attempted 0

Message
Executed as user: tu\abc . xp_sendmail: failed with mail error 0x8004060c [SQLSTATE 42000] (Error 17925).  The step failed.

April 21st, 2014 8:33am

This is from sql server 2005 sp2.

Any specific help?

April 21st, 2014 10:13am

Please post the database mail log, otherwise it's just guessing in the dark.
Free Windows Admin Tool Kit Click here and download it now
April 21st, 2014 10:19am

As Sean already wrote, check first the logs, see Troubleshooting Database Mail: General steps and Database Mail Log and Audits
April 21st, 2014 10:37am

Here is error log:

Date  4/21/2014 6:30:00 AM
Log  Job History (Email Notification)

Step ID  1
Server  test

Job Name  Email Notification
Step Name  sp99_email_process
Duration  00:00:46
Sql Severity 16
Sql Message ID 7412
Operator Emailed 
Operator Net sent 
Operator Paged 
Retries Attempted 0

Message
Executed as user: TU\ABC. SQL Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF]. [SQLSTATE 42000] (Error 65535)  OLE DB provider "SQLNCLI" for linked server "TU\John" returned message "Login timeout expired". [SQLSTATE 01000] (Error 7412)  OLE DB provider "SQLNCLI" for linked server "TU\John" returned message "An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.". [SQLSTATE 01000] (Error 7412).  The step failed.

April 21st, 2014 11:22am

Hello,

That's the log from the job, we're interested in the log for database mail which is held in MSDB. I do want to note that you're having login issues with that job that should be investigated.

Look at msdb.dbo.sysmail_event_log which should have the reason for mail send failures.

Free Windows Admin Tool Kit Click here and download it now
April 21st, 2014 11:33am

I run

select * from msdb.dbo.sysmail_event_log

I find following log:Any help?

log_id event_type log_date description process_id mailitem_id account_id last_mod_date last_mod_user
11853 error 2014-04-21 06:41:01.060 The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2014-04-21T06:41:01). Exception Message: Cannot send mails to mail server. (The specified string is not in the form required for an e-mail address.).
) 8568 49460 NULL 2014-04-21 06:41:01.060 sa

April 21st, 2014 12:13pm

Hello,

From the error posted:

Exception Message: Cannot send mails to mail server. (The specified string is not in the form required for an e-mail address.).

Double check your recipient addresses are valid.

Free Windows Admin Tool Kit Click here and download it now
April 21st, 2014 12:19pm

Here is error log:

Date  4/21/2014 6:30:00 AM
Log  Job History (Email Notification)

Step ID  1
Server  test

Job Name  Email Notification
Step Name  sp99_email_process
Duration  00:00:46
Sql Severity 16
Sql Message ID 7412
Operator Emailed 
Operator Net sent 
Operator Paged 
Retries Attempted 0

Message
Executed as user: TU\ABC. SQL Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF]. [SQLSTATE 42000] (Error 65535)  OLE DB provider "SQLNCLI" for linked server "TU\John" returned message "Login timeout expired". [SQLSTATE 01000] (Error 7412)  OLE DB provider "SQLNCLI" for linked server "TU\John" returned message "An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.". [SQLSTATE 01000] (Error 7412).  The step failed.


Hi bestrongself,

According to your error message, we need to verify if you configure SQL Server Database Mail to send email successfully by using your Windows Live Mail account or your mail account. If yes, then you choose use database mail to send a job fail error message or others. We need to verify if your job owner account which used does have permissions. Check the job owner and the user being for the Agent service has SQL Server admin rights. Add the dbo_owner role to the Job Owner via SQL Server Management Studio.

There is an similar error about data jobs fail message, you can review the following article.

https://support.software.dell.com/capacity-manager-for-sql-server/kb/51365

There is an example configuring SQL Server Database Mail to send email, you can review the following blog.

http://blogs.msdn.com/b/suhde/archive/2009/07/12/how-to-configure-sql-server-database-mail-to-send-email-using-your-windows-live-mail-account-or-your-gmail-account.aspx

Regards,
Sofiya Li

If you have any feedback on our support, please click here.

April 22nd, 2014 4:46am

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

Other recent topics Other recent topics