Unable to Send mail through Database Mail

  •  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.

    Nomi

  • Nomi,

    Database mail can only be configured using a SMTP server for outgoing mail. From the error messages it looks to like either the server doesn't exists or can't be reached from the SQL Server machine. Check the profile settings and if your able to ping the SMTP server on port 25.

    Markus

    [font="Verdana"]Markus Bohse[/font]

  • Markus,

    As I have mentioned earlier that it is basically a gmail account that i am trying to configure and it is accessible form that machine. I am able to send mail through the same account using outlook and xp_sendmail bu not through database mail.

    nomi

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply