Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


xp_sendmail not sending @message text


xp_sendmail not sending @message text

Author
Message
jshmccal
jshmccal
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 Visits: 73
xp_sendmail will send out the email with correct to address, correct subject line but the message text is blank. This has been working.
We were just migrated to Exchange 2010.
We have ran xp_stopmail, recreated outlook profile and SQL mail profile, then ran xp_startmail.


We are out of ideas. Any help will be greatly appreciated.

Thanks
Jack
Lowell
Lowell
SSChampion
SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)

Group: General Forum Members
Points: 14959 Visits: 38981
are you concatenating strings, and one of them is null?
you know the old SET @string = Firstname + ' ' + LastName,
where ofirstname might be null or something?

Lowell

--
help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

jshmccal
jshmccal
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 Visits: 73
Running this through query sends email with no message. to line and subj line are fine.

EXEC master.dbo.xp_sendmail @recipients = 'jm7563@att.com',
@message = 'test message',
@subject = 'Peer One Salary Recommendation Alert'
rhammer2
rhammer2
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 14
Just kicking to the top. We still need an answer to this issue.
chrisfradenburg
chrisfradenburg
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1732 Visits: 2057
I'm running into this too. In my case it's an existing process on a SQL 2000 SP4 box that started erroring sending mail (no error messages that appear useful). I stopped then started the mail session and mail started sending but the message body is always blank even when passing in a normal string. The goal is to email query results in the message body. I'm able to attach them and we're doing that for now as a workaround. I've already tried the following:
http://support.microsoft.com/kb/314304

The registry key that it said to remove doesn't exist and I tried both true and false (and not passing in) @ansi_attachments with no success. It's a production box so I'm working on arranging a reboot but I'm not holding much hope for that. Does anyone have any thoughts?
rhammer2
rhammer2
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 14
We believe the issue is how MS SQL 2000's SQL Mail interacts with the newest version of MS Exchange Server (our problem started when the Exchange server was updated).

I found an addin function, xp_smtp_sendmail, that fixes the problem.
Go to: http://www.sqlservercentral.com/Forums/FindPost320477.aspx
chrisfradenburg
chrisfradenburg
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1732 Visits: 2057
That's probably what did it for us. I found out that they did some mailbox moves this week and the account is currently on the new server. The tech that did the moves is out so I haven't been able to confirm that this mailbox moved but it seems to be the most likely case.

As a note, the link to the package in the other post is broken. We have a copy I can use from another server though.
cdove
cdove
Grasshopper
Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)

Group: General Forum Members
Points: 11 Visits: 69
I am having this same issue. I use the same email account on 2 SQL 2000 servers. Everything works great on one of hte servers, but the @message is not being sent on the other server. I have verified that everything is set up the same on both servers. Any ideas?
John Waclawski
John Waclawski
Valued Member
Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)Valued Member (57 reputation)

Group: General Forum Members
Points: 57 Visits: 415
I too am running into this with SQL Server 2008 R2 at the moment.

I'm getting a subject line, no body text. Still plugging away at it. If I get it running, I'll post what I did to get it running.

Until then, if anyone has a fix, please elaborate.

Thanks!

======================================================
John
SQL Server 200x Newb and proud of it! :-D
======================================================
zulmanclock
zulmanclock
SSC Veteran
SSC Veteran (231 reputation)SSC Veteran (231 reputation)SSC Veteran (231 reputation)SSC Veteran (231 reputation)SSC Veteran (231 reputation)SSC Veteran (231 reputation)SSC Veteran (231 reputation)SSC Veteran (231 reputation)

Group: General Forum Members
Points: 231 Visits: 455
John Waclawski (3/11/2013)
I too am running into this with SQL Server 2008 R2 at the moment.

I'm getting a subject line, no body text. Still plugging away at it. If I get it running, I'll post what I did to get it running.

Until then, if anyone has a fix, please elaborate.

Thanks!





Here is a piece of code i use for sending mail in SQL Server 2008 R2:

EXEC msdb.dbo.SP_SEND_DBMAIL @PROFILE_NAME = 'Your Profile Here',
@Recipients ='test@email.com',
@Subject = 'Subject Line',
@body = 'Your Message Here'

This article gives you step by step to setup db mail if you have not done so already:

http://blog.sqlauthority.com/2008/08/23/sql-server-2008-configure-database-mail-send-email-from-sql-database/
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search