SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
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  

indra7
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
blank.

Any help on this would be much appreciated.
Thanks.


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 = 'xx...@xxxxx.com',
@subject = 'test',
@message = @mes


EXEC master..xp_stopmail

spirit1
Cybernetic Yak Master

Slovenia
11750 Posts

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

also sending mail from a trigger is very bad


Go with the flow & have fun! Else fight the flow
Blog thingie: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

svicky9
Posting Yak Master

United Kingdom
232 Posts

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

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.


Vic
Go to Top of Page

indra7
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

rweston002
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.06 seconds. Powered By: Snitz Forums 2000