Stored Proc Pass in HTML file attach in Email

I need to pass in an html file and then attach it to the email what is the best way??

thanks

This is what I have working ( I just need the attachment)
CREATE PROCEDURE [dbo].[Send_Email_Html] 
	@TO_EMAIL VARCHAR(100),
	@SUBJECT VARCHAR(255),
	@BODY VARCHAR(MAX),
 
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;
	exec msdb.dbo.sp_send_dbmail      
				@profile_name = 'GenericEmail',
				@recipients = @TO_EMAIL, 
				@BODY_FORMAT = 'HTML',
				@body = @BODY,   
				@subject = @SUBJECT;		
 
 
END
 
 
 
GO

Open in new window

cstrattonAsked:
Who is Participating?
 
RiteshShahCommented:
May I know why my answer has rated "C"?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.