November 4, 2013 at 7:20 am
Hello,
We have a database mail configured in SQL Server.
When we are trying to send a mail using any procedure it is showing "Mail Queued".
When I checked the event log using teh following script :
SELECT * FROM msdb.dbo.sysmail_event_log order by last_mod_date desc
It shows "DatabaseMail process is started"
After 10 mins it is logging an entry saying "DatabaseMail process is shutting down" but the mail is not getting delivered.
The following are the results of the stored procs those I have used for analysis:
EXECUTE dbo.sysmail_help_status_sp
result: Started
SELECT is_broker_enabled FROM sys.databases WHERE name = 'msdb'
Result : 1
The error log shows the following message:
[251] Step 1 of job 9DC655A1-1374-46F8-A85C-367957D5CDA7 is being queued for the TSQL subsystem
When I am sending the mail from Test mailer I am getting the mail delivered to email.
Please let me know if there is solution for this issue. Please let me know if you need any further information to analyze the issue.
November 4, 2013 at 11:34 am
Can you successfully send a test email from SSMS my right-clicking Database Mail and selecting Send Test Email?
November 4, 2013 at 9:10 pm
Yes, I can send it from Database Mail > Send Test Mail
November 5, 2013 at 7:14 am
As a first, there's this:
http://technet.microsoft.com/en-us/library/ms187540(v=sql.105).aspx
🙂
Can you share a extract of the procedure that you're using to send mail ? just the bit that does the sending, not the full text...
[font="Courier New"]sqlmunkee[/font]
[font="Courier New"]Bringing joy and happiness via SQL Server since 1998[/font]
November 6, 2013 at 1:59 am
Hello,
The following is the code for sending mail:
EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'Profile Name',
@recipients=@userEmail,
@body = @msg,
@subject = 'Notification',
@sensitivity = 'Confidential'
November 6, 2013 at 2:46 am
As long as your mail profile is called 'Profile Name', that looks OK.
Have you checked the logs as per http://technet.microsoft.com/en-us/library/ms190630(v=sql.105).aspx ?
[font="Courier New"]sqlmunkee[/font]
[font="Courier New"]Bringing joy and happiness via SQL Server since 1998[/font]
November 6, 2013 at 5:47 am
When I execute the following query:
select * from sysmail_allitems
where subject like '%word%'
order by last_mod_date desc
I found the status is showing sent. But no mail is delivered to the email id.
Please note that the issue is occuring with mails with Sensitivity= 'CONFIDENTIAL'.
November 6, 2013 at 6:59 am
..... Sensitivity= 'CONFIDENTIAL'.
If you omit the @sensitivity parameter, does the mail send OK ? And I know it's a stupid question, but can you send a mail to the intended recipients normally ?
The mail address should be user.name@yourdomain.com (ie full address). SMTP may not route 'John Smith', but it should route 'john.smith@yourcompany.com'.
[font="Courier New"]sqlmunkee[/font]
[font="Courier New"]Bringing joy and happiness via SQL Server since 1998[/font]
November 7, 2013 at 7:09 am
I had this problem where I worked previously.
They had McAfee installed and there was an option in the settings you had to untick (something like "don't allow worms to send mail").
After that it was fine.
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply