Results 1 to 2 of 2

Thread: Can I email HTML from SQL 7.0 stored proc?

  1. #1
    Lawrence LaVerne Guest

    Can I email HTML from SQL 7.0 stored proc?

    I have a proc that generates report content, then emails it, to some sales people. I'd like to use HTML to format the report content (bold letters, underlined, tab spaces, etc), but all I see in the resulting email, is the HTML tags with the content. I've tried to find a way to set the "content type" to text/html (like you'd do in VBScript) but that setting is nowhere to be found in xp_sendmail.
    Any ideas on how to make this work, or perhaps another way to format the email content from within a stored proc?

  2. #2
    phil mc Guest

    Can I email HTML from SQL 7.0 stored proc? (reply)

    You could construct the web page using the Web publishing features of SQL, then email the HTML page as an attachement. When they double click on the page the browser will open it and display it correctly.

    You can use a template HTML file and invoke it from within SQL so that your results go onto a standard page (eg company logo, then disclaimer, then results from SQL query). Then Email this off.

    there might be some examples on www.sqlconsultants.co.uk

    Phil


    ------------
    Lawrence LaVerne at 6/20/01 7:49:51 PM

    I have a proc that generates report content, then emails it, to some sales people. I'd like to use HTML to format the report content (bold letters, underlined, tab spaces, etc), but all I see in the resulting email, is the HTML tags with the content. I've tried to find a way to set the "content type" to text/html (like you'd do in VBScript) but that setting is nowhere to be found in xp_sendmail.
    Any ideas on how to make this work, or perhaps another way to format the email content from within a stored proc?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •