Results 1 to 3 of 3

Thread: xp_sendmail formatting

  1. #1
    steve Guest

    xp_sendmail formatting

    I am using xp_sendmail to fire off e-mails from asp code when certain events happen (i.e. an insert to a table). My Users would like the e-mail to be nicely formatted with line breaks, bold, colours etc. There is nothing in the xp_sendmail command itself to do this. Is there some way of embedding html commands within the message? But then does the e-mail have to be sent in a certain way for the recepient to get the formatting and not just receive a lot of strange (to them) codes in the message? Or is there any other way of achieving the desired end result?


  2. #2
    MAK Guest

    xp_sendmail formatting (reply)

    This will send any message as x.html. In the message format it using
    HTML tags.

    Here is the example

    EXEC master..xp_sendmail @recipients = 'mak_999@yahoo.com',
    @query =&#34;select &#39;<html><B> Hi Mak. </b> <br> Its a test message.<br><br><hr><B>-Sweetie</b></html>&#39;&#34;,
    @subject = &#39;HTML Sample&#39;,
    @attach_results = &#39;TRUE&#39;, @width = 250,@no_header =&#39;True&#39;,
    @attachments = &#34;x.html&#34;




    ------------
    steve at 5/22/2002 7:29:33 AM

    I am using xp_sendmail to fire off e-mails from asp code when certain events happen (i.e. an insert to a table). My Users would like the e-mail to be nicely formatted with line breaks, bold, colours etc. There is nothing in the xp_sendmail command itself to do this. Is there some way of embedding html commands within the message? But then does the e-mail have to be sent in a certain way for the recepient to get the formatting and not just receive a lot of strange (to them) codes in the message? Or is there any other way of achieving the desired end result?


  3. #3
    steve Guest

    xp_sendmail formatting (reply)

    Thanks, MAK. I&#39;ll try it out


    ------------
    MAK at 5/22/2002 9:17:58 AM

    This will send any message as x.html. In the message format it using
    HTML tags.

    Here is the example

    EXEC master..xp_sendmail @recipients = &#39;mak_999@yahoo.com&#39;,
    @query =&#34;select &#39;<html><B> Hi Mak. </b> <br> Its a test message.<br><br><hr><B>-Sweetie</b></html>&#39;&#34;,
    @subject = &#39;HTML Sample&#39;,
    @attach_results = &#39;TRUE&#39;, @width = 250,@no_header =&#39;True&#39;,
    @attachments = &#34;x.html&#34;




    ------------
    steve at 5/22/2002 7:29:33 AM

    I am using xp_sendmail to fire off e-mails from asp code when certain events happen (i.e. an insert to a table). My Users would like the e-mail to be nicely formatted with line breaks, bold, colours etc. There is nothing in the xp_sendmail command itself to do this. Is there some way of embedding html commands within the message? But then does the e-mail have to be sent in a certain way for the recepient to get the formatting and not just receive a lot of strange (to them) codes in the message? Or is there any other way of achieving the desired end result?


Posting Permissions

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