Hi--I have the following (Sql Server) code that works if I do not add the attachment line, but if I do add the attachment line it queues up but is not sent. I am thinking that the syntax for the line is incorrect. In thoughts would be greatly appreciated. I am using Office 365.
DECLARE @TempTo varchar(20)
Select @TempTo = '[email protected]'
EXEC @return_value = dbo.sp_send_cdosysmail
@From = '[email protected]',
@To = @TempTo,
@Subject = N'cdo stored procedure test',
@Body = N'hi'
--@Attachment = 'C:\Temp\TestDoc.txt' --(This doesn't work when uncommented)
SELECT 'Return Value' = @return_value
Bookmarks