locked
Unable to Send mail through Database Mail RRS feed

  • Question

  • Hi Everybody,

    I have Windows Server 2003 and SQL Server 2005 Standard Edition 2005 with service pack1. I have configured database mail for a gmail account and i am unable to send the mail. I can use the same account with outlook and SQL Mail successfully to send the mail. I cannot understand why only Database Mail is failing, Here is the error message I recieve:

    10/30/2006 11:24:23,,Error,18,The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2006-10-30T11:24:23). Exception Message: Cannot send mails to mail server. (The operation has timed out.).
    ),688,7,,10/30/2006 11:24:23 AM,sa

    The complete log file is as shown below:

    Date,Source,Severity,Log ID,Message,Process ID,Mail Item ID,Account ID,Last Modified,Last Modified By
    10/30/2006 11:33:43,,Information,20,DatabaseMail process is shutting down,688,,,10/30/2006 11:33:43 AM,HIQU\Administrator

    10/30/2006 11:33:43,,Error,19,1) Exception Information<nl/>===================<nl/>Exception Type: Microsoft.SqlServer.Management.SqlIMail.Server.Common.BaseException<nl/>Message: The Transaction not longer valid.<nl/>Data: System.Collections.ListDictionaryInternal<nl/>TargetSite: Void ValidateConnectionAndTransaction()<nl/>HelpLink: NULL<nl/>Source: DatabaseMailEngine<nl/><nl/>StackTrace Information<nl/>===================<nl/>   at Microsoft.SqlServer.Management.SqlIMail.Server.DataAccess.ConnectionManager.ValidateConnectionAndTransaction()<nl/>   at Microsoft.SqlServer.Management.SqlIMail.Server.DataAccess.ConnectionManager.RollbackTransaction()<nl/>   at Microsoft.SqlServer.Management.SqlIMail.IMailProcess.QueueItemProcesser.GetDataFromQueue(DataAccessAdapter da<c/> Int32 lifetimeMinimumSec)<nl/>   at Microsoft.SqlServer.Management.SqlIMail.IMailProcess.QueueItemProcesser.ProcessQueueItems(String dbName<c/> String dbServerName<c/> Int32 lifetimeMinimumSec<c/> LogLevel loggingLevel),688,,,10/30/2006 11:33:43 AM,HIQU\Administrator


    10/30/2006 11:24:23,,Error,18,The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2006-10-30T11:24:23). Exception Message: Cannot send mails to mail server. (The operation has timed out.).
    ),688,7,,10/30/2006 11:24:23 AM,sa

    10/30/2006 11:21:43,,Error,17,The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2006-10-30T11:21:43). Exception Message: Cannot send mails to mail server. (The operation has timed out.).
    ),688,7,,10/30/2006 11:21:43 AM,sa

    10/30/2006 11:15:46,,Error,16,The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2006-10-30T11:15:46). Exception Message: Cannot send mails to mail server. (The operation has timed out.).
    ),688,6,,10/30/2006 11:15:46 AM,sa

    10/30/2006 11:13:05,,Error,15,The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2006-10-30T11:13:05). Exception Message: Cannot send mails to mail server. (The operation has timed out.).
    ),688,6,,10/30/2006 11:13:05 AM,sa

    10/30/2006 11:09:22,,Error,14,The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2006-10-30T11:09:22). Exception Message: Cannot send mails to mail server. (The operation has timed out.).
    ),688,5,,10/30/2006 11:09:22 AM,sa

    10/30/2006 11:06:42,,Error,13,The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2006-10-30T11:06:41). Exception Message: Cannot send mails to mail server. (The operation has timed out.).
    ),688,5,,10/30/2006 11:06:42 AM,sa

    10/30/2006 11:04:59,,Information,12,DatabaseMail process is started,688,,,10/30/2006 11:04:59 AM,HIQU\Administrator


    10/30/2006 10:55:02,,Error,10,1) Exception Information<nl/>===================<nl/>Exception Type: Microsoft.SqlServer.Management.SqlIMail.Server.Common.BaseException<nl/>Message: The Transaction not longer valid.<nl/>Data: System.Collections.ListDictionaryInternal<nl/>TargetSite: Void ValidateConnectionAndTransaction()<nl/>HelpLink: NULL<nl/>Source: DatabaseMailEngine<nl/><nl/>StackTrace Information<nl/>===================<nl/>   at Microsoft.SqlServer.Management.SqlIMail.Server.DataAccess.ConnectionManager.ValidateConnectionAndTransaction()<nl/>   at Microsoft.SqlServer.Management.SqlIMail.Server.DataAccess.ConnectionManager.RollbackTransaction()<nl/>   at Microsoft.SqlServer.Management.SqlIMail.IMailProcess.QueueItemProcesser.GetDataFromQueue(DataAccessAdapter da<c/> Int32 lifetimeMinimumSec)<nl/>   at Microsoft.SqlServer.Management.SqlIMail.IMailProcess.QueueItemProcesser.ProcessQueueItems(String dbName<c/> String dbServerName<c/> Int32 lifetimeMinimumSec<c/> LogLevel loggingLevel),3144,,,10/30/2006 10:55:02 AM,HIQU\Administrator

    10/30/2006 10:55:02,,Information,11,DatabaseMail process is shutting down,3144,,,10/30/2006 10:55:02 AM,HIQU\Administrator

    10/30/2006 10:45:42,,Error,9,The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2006-10-30T10:45:42). Exception Message: Cannot send mails to mail server. (The operation has timed out.).
    ),3144,4,,10/30/2006 10:45:42 AM,sa

    10/30/2006 10:43:01,,Error,8,The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2006-10-30T10:43:01). Exception Message: Cannot send mails to mail server. (The operation has timed out.).
    ),3144,4,,10/30/2006 10:43:01 AM,sa

    10/30/2006 10:35:44,,Error,7,The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2006-10-30T10:35:44). Exception Message: Cannot send mails to mail server. (The operation has timed out.).
    ),3144,3,,10/30/2006 10:35:44 AM,sa

    10/30/2006 10:33:03,,Error,6,The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2006-10-30T10:33:03). Exception Message: Cannot send mails to mail server. (The operation has timed out.).
    ),3144,3,,10/30/2006 10:33:03 AM,sa

    10/30/2006 10:27:14,,Error,5,The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2006-10-30T10:27:14). Exception Message: Cannot send mails to mail server. (The operation has timed out.).
    ),3144,2,,10/30/2006 10:27:14 AM,sa

    10/30/2006 10:26:12,,Error,4,The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2006-10-30T10:26:12). Exception Message: Cannot send mails to mail server. (The operation has timed out.).
    ),3144,1,,10/30/2006 10:26:12 AM,sa

    10/30/2006 10:24:36,,Error,3,The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2006-10-30T10:24:33). Exception Message: Cannot send mails to mail server. (The operation has timed out.).
    ),3144,2,,10/30/2006 10:24:36 AM,sa

    10/30/2006 10:23:30,,Error,2,The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2006-10-30T10:23:28). Exception Message: Cannot send mails to mail server. (The operation has timed out.).
    ),3144,1,,10/30/2006 10:23:30 AM,sa

    10/30/2006 10:21:45,,Information,1,DatabaseMail process is started,3144,,,10/30/2006 10:21:45 AM,HIQU\Administrator

    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    After this I reconfigured the DatabaseMail with another account. This time there is no error but e-mails are not going anywhere and are stuck in the queue somewhere. The sent_status field in the sysmail_allitems view is giving me a value of 'unsent'.

    Any idea folks.
    Nauman


    Monday, October 30, 2006 10:31 AM

Answers

  • Hi, I faced the same problem and could solve it with the following Went to Server Agent Properties, then Alert System, Enable Mail Profile "Database Mail". Then to History and checked on Delete job history. Stopped and Restarted SQL Server Agent and it worked. I hope this helps. Regards VaishaliHusain
    Husain
    Tuesday, February 10, 2009 9:58 AM

All replies

  •  

    the email account you're using as the default email account in your profile is full.

    Empty your inbox and the mails will be able to go out to its destination

    Friday, September 7, 2007 7:00 AM
  • Hi, I faced the same problem and could solve it with the following Went to Server Agent Properties, then Alert System, Enable Mail Profile "Database Mail". Then to History and checked on Delete job history. Stopped and Restarted SQL Server Agent and it worked. I hope this helps. Regards VaishaliHusain
    Husain
    Tuesday, February 10, 2009 9:58 AM
  • Thanks - That worked.

    Tom
    Friday, May 1, 2009 4:19 AM
  • I have the same problem. 

    I am using SQLServer 2008 R2 for sending mail.

    I followed this article.

    Error :

    The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 3 (2011-06-13T15:50:48). Exception Message: Cannot send mails to mail server. (The operation has timed out.). )

    any idea?

    Monday, June 13, 2011 11:18 AM
  • Have used the same, its started working, but again after some time period its stops sending the mails....
    Tuesday, June 25, 2013 10:40 AM