I'm currently using T-SQL to send an email with attachment from a stored procedure:
EXEC @return_status = msdb.dbo.sp_send_dbmail
@profile_name = 'ProfileName',
@recipients = @recipients,
@body = @mailbody,
@subject = @subject,
@file_attachments = @full_attachment_filename
I would like to set a custom header on the email being sent. Is there a way to do that using the sp_send_dbmail
stored procedure?
More info: the SQL server version is 2005, and it's sending the email through a Microsoft Exchange server (2003).