Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 Old Forums
 CLOSED - General SQL Server
 The 'subject' in SQL Mail
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

5 Posts

Posted - 06/11/2006 :  22:08:38  Show Profile
I'm using the following code in a trigger: (in SQL Server 2000)
And while a message is successfully sent and it includes the
appropriate message and recipient data, the subject is constantly left

Any help on this would be much appreciated.

declare @mes varchar(250)
declare @mes2 nvarchar(1450)

set @mes2 = (select Identified_Vuln from inserted)
set @mes = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

EXEC master..xp_startmail
EXEC master..xp_sendmail

@recipients = '',
@subject = 'test',
@message = @mes

EXEC master..xp_stopmail

Cybernetic Yak Master

11752 Posts

Posted - 06/12/2006 :  05:48:40  Show Profile  Visit spirit1's Homepage
@subject = N'test',

also sending mail from a trigger is very bad

Go with the flow & have fun! Else fight the flow
Blog thingie:
Go to Top of Page

Posting Yak Master

United Kingdom
232 Posts

Posted - 06/12/2006 :  11:17:08  Show Profile  Visit svicky9's Homepage

exec xp_sendmail 'vic','Backup Report','exec ab_backupreport',@subject = N'Backup report'

I am sending the email like this .
But it still has a blank subject

what should be the problem.

Go to Top of Page

Starting Member

5 Posts

Posted - 06/12/2006 :  20:42:30  Show Profile
First, thank you for responding. I really appreciate it.
But, I tried exactly what you suggested and it didn't work.
Go to Top of Page

Starting Member

1 Posts

Posted - 05/26/2007 :  20:28:56  Show Profile
I came acorss the issue with SQL server 2000 + sp4. I replaced the sqlmap70.dll with the sp3 version ( there is a different version in every sp ), restarted the sql server and voila...

I realize the last time someone responded to this post, but i'm posting just in case it helps someone in the future.
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000