September 25, 2003 at 12:33 pm
Hello!
I have borrowed a procedure(sp_mailer) using the CDONTS functionality to avoid having to use SQL mail in order to send the result of a stored procedure in the body of an email. My problem is that the email is sent with the name of the stored procedure in the body rather than the actual result set.
Here is my dilemma:
DECLARE @SQLString NVARCHAR(4000)
SET @SQLString='sp_MasterEmailList_NCREmailUpdate_Process'
EXECUTE sp_executesql @SQLString
EXECUTE Email_Notification.dbo.sp_mailer 'MSSQLAdmin@netbank.com', 'jminnick@netbank.com; ralarcon@netbank.com', '', 'Email Update Report', @SQLString
I get an email with 'sp_MasterEmailList_NCREmailUpdate_Process' in the body of the email rather than the result set.
Any help or suggestions would be greatly appreciated.
Thanks,
Julie
September 26, 2003 at 5:08 am
I have 2 questions:
1) can you show the code for the borrowed procedure that you are using?
2) Why don't you want to use SQL Server's xp_sendmail for this?
Edited by - womalley on 09/26/2003 05:08:35 AM
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply