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

sp_send_dbmail problem Expand / Collapse
Author
Message
Posted Thursday, October 25, 2012 3:41 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, October 28, 2014 2:51 AM
Points: 22, Visits: 92
Hello,

I've got a very strange problem, I can send mail with the following statement:

declare @Error int

EXEC @Error = msdb.dbo.sp_send_dbmail
@profile_name = 'SQL Mail',
@recipients='<mymailaddress>',
@subject = 'Database Mail Test',
@body = 'This is a test e-mail sent from Database Mail on <server>\<instance>',
@body_format = 'Text' ;

select @Error

When I change the subject or body, the mail will not be send?!

How can this happen?

Thanks for your reply...

Greetings Mischa.
Post #1376870
Posted Thursday, October 25, 2012 3:49 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Wednesday, December 17, 2014 2:16 AM
Points: 2,840, Visits: 3,983
can you post the complete changed database mail SP call you are using.

-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done
Post #1376873
Posted Thursday, October 25, 2012 4:18 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Yesterday @ 6:55 AM
Points: 279, Visits: 580
What error message do you get?
Post #1376889
Posted Thursday, October 25, 2012 4:37 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, October 28, 2014 2:51 AM
Points: 22, Visits: 92
Thanks for the replies! I have the solution, mail was not configured completely. Run this script:
sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
sp_configure 'Database Mail XPs', 1;
GO
RECONFIGURE
GO

Problem solved! I just do not understand why the test message is sending correctly when these options are not set...

Best regards,


Mischa
Post #1376898
Posted Thursday, October 25, 2012 4:40 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Wednesday, December 17, 2014 2:16 AM
Points: 2,840, Visits: 3,983
Mischa E.J. Hoogendoorn (10/25/2012)
I just do not understand why the test message is sending correctly when these options are not set...
i stil dont believe this , if the mail was not configurd , msgs cant be sent


-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done
Post #1376905
Posted Thursday, October 25, 2012 4:48 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, October 28, 2014 2:51 AM
Points: 22, Visits: 92
I just tried it, and it worked... Same server, nothing else changed, except for a reboot.

Best regards,


Mischa
Post #1376908
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse