Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

database mail sending error Expand / Collapse
Author
Message
Posted Friday, November 20, 2009 2:43 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, December 12, 2013 1:15 AM
Points: 187, Visits: 376
hi,


i am getting following error

Msg 14641, Level 16, State 1, Procedure sp_send_dbmail, Line 81
Mail not queued. Database Mail is stopped. Use sysmail_start_sp to start Database Mail.


as per this i did exec sysmail_start_sp

that time it's show me status started but when again i start to send it's showing me same error again


any one has any suggestion or solution then let me know asap


Raj Acharya
Post #822183
Posted Friday, November 20, 2009 3:10 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, December 6, 2012 2:49 PM
Points: 140, Visits: 310
Was it working fine earlier?
Try sending a test mail and see the log for what's happening?

If the test mail is fine:
Go to SQL Agent Properties-->Alert System-->Enable Database Mail.
Restart the SQL Agent.

If the test mail is throwing an issue:
Check with the network adminstrators if SMTP service is running fine and is it allowing the mails (sort of).

Regards,
Pavan.
Post #822203
Posted Friday, November 20, 2009 3:50 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, December 12, 2013 1:15 AM
Points: 187, Visits: 376
you don't get my point previously it was working fine

let me tell you step by step

for testing purpose i am executing like below

EXEC msdb..sp_send_dbmail
@profile_name = 'profilename'
,@recipients = 'test@vcmpartners.com'
,@subject = 'test mail'
,@body_format = 'HTML'
,@body = 'test mail'
,@from_address = 'prod@vcmpartners.com'



it's show me error

Msg 14641, Level 16, State 1, Procedure sp_send_dbmail, Line 81
Mail not queued. Database Mail is stopped. Use sysmail_start_sp to start Database Mail.


as per error suggest

EXEC msdb.dbo.sysmail_start_sp; ----- to start database mail

also check status through

EXEC msdb.dbo.sysmail_help_status_sp;

it's shows me started

after that if i try to send it's show me

mail queued


but i don't get any mail

again if i start to send test mail it's shows me same error and what's it's relation to sql agent mail enable or disable




Raj Acharya
Post #822225
Posted Friday, November 20, 2009 6:55 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 2:20 PM
Points: 11,305, Visits: 13,094
I have written a couple of blog posts about problems with database mail that may help. You can read them here and here.



Jack Corbett

Applications Developer

Don't let the good be the enemy of the best. -- Paul Fleming

Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
Post #822349
Posted Monday, November 23, 2009 2:52 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, December 6, 2012 2:49 PM
Points: 140, Visits: 310
Hey Raj,

I had a similar issue, even my test mail was failing and it was giving similar sort of error.
While setting the db mail, in the SMTP server, I used the loopback address 127.0.0.1./ it can be even your IP address.(Anonymous authentication)

Even my test mail was failing, then I went to IIS Manager, select the Default SMTP server, and under General tab set the IP address as ALL Assigned.
Try this and see if it works.

Cheers,
Pavan.
Post #823145
Posted Monday, November 23, 2009 3:35 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, December 12, 2013 1:15 AM
Points: 187, Visits: 376
pavan,


actually here we are using exchange server so in smtp i need to put that, my problem seems different then you.

guys when i go deep into this i got one error from mail log error described as following

Exception Information =================== Exception Type: System.Data.SqlClient.SqlException
Errors: System.Data.SqlClient.SqlErrorCollection Class: 16
LineNumber: 1 Number: 6602 Procedure: sp_xml_preparedocument
Server: SQL2008 State: 2 Source: .Net SqlClient Data Provider
ErrorCode: -2146232060 Message: The error description is 'Whitespace is not allowed at this location.'.
Data: System.Collections.ListDictionaryInternal
TargetSite: Void OnError(System.Data.SqlClient.SqlException, Boolean)
HelpLink: NULL
StackTrace Information ===================


i am going to concentrate on this 'Whitespace is not allowed at this location.'

i think this is something which making problem

whatever thanx for your reply pavan i am also trying to find my solution.




Raj Acharya
Post #823163
Posted Tuesday, September 7, 2010 11:18 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Friday, April 11, 2014 11:43 AM
Points: 210, Visits: 281
After starting the service using sysmail_start_sp run the following script. This will solve the issue

SET NOCOUNT ON
Declare @ch uniqueidentifier;
Declare @message_type nvarchar(256);
Declare @message_body nvarchar(max);
Declare @ctr bigint;
Declare @ctr2 bigint;
While (1=1)
Begin
Receive @ch = conversation_handle, @message_type = message_type_name from ExternalMailQueue
set @ctr2 = @ctr2 + 1
set @ctr = (select count(*) from ExternalMailQueue)
if @ctr = 0
break
end

++++++++++++++++++++++++++
Allways think Positive
++++++++++++++++++++++++++
Post #981749
Posted Wednesday, December 15, 2010 4:41 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, August 26, 2014 1:42 PM
Points: 232, Visits: 234
It worked for me....Thanks for the Query James..... can you please tell us what was the reason Database mail was behaving like that.

Thanks in advance... :)
Post #1035017
Posted Wednesday, February 6, 2013 4:14 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, February 6, 2013 4:12 AM
Points: 3, Visits: 17
Yes, its resolved my problem.
Post #1416401
Posted Tuesday, August 6, 2013 1:15 PM


Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, September 5, 2014 8:59 AM
Points: 3, Visits: 194
This saved my bacon as well. Now, to figure out what it actually does...

thanks!
Post #1481513
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse