Hello
I tried for hours to get my notifications working, without success, on SQL Server 2008R2 Web Edition 64b
I send mail with the test :
USE msdb
GO
EXEC sp_send_dbmail @profile_name='ARRIERE',@recipients='mai@mail.tld',
@subject='Bonjour ',@body='Congrates Database Mail Received By you Successfully.'
But this mail seems to be never sent.
With:
EXEC msdb.dbo.sysmail_help_queue_sp @queue_type = 'mail';
The queue state is always INACTIVE, and length is growing everytime I send a email.
I tried to restart the mail system some times :
EXEC msdb.dbo.sysmail_stop_sp; EXEC msdb.dbo.sysmail_start_sp;
The states goes RECEIVE OCURRING, but after some seconds and without intervention, it goes back to INACTIVE.
I tried to rester SQL Agent, SQL Server, the server himself, but no luck.
The broker is activated (SELECT is_broker_enabled FROM sys.databases WHERE name = 'msdb' ;)
I disabled every firewall, antivirus and others (by the way, I can do "telnet smtp.domain.tld 25" and send a mail with telnet.
With
SELECT * FROM msdb.dbo.sysmail_allitems;
I see all my mails with state "unsent".
Nothing logged in Event Viewer, SQL Events, and in sysmail_event_log I only get "Activation successful".
I configured the local IIS SMTP as a relay as said here : http://social.msdn.microsoft.com/Forums/en/sqldatabaseengine/thread/f9744284-a9b6-4bfb-81b9-c4833f282ad0
I cleaned the mails with:
DECLARE @GETDATE datetime SET @GETDATE = GETDATE() EXECUTE msdb.dbo.sysmail_delete_mailitems_sp @sent_before = @GETDATE; GO
=> Nothing more.
Can I do something more?
Thans for your help.
Regards