Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««678910»»»

Data Driven Subscriptions Updated Expand / Collapse
Author
Message
Posted Tuesday, November 29, 2011 9:38 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, December 8, 2011 4:42 PM
Points: 7, Visits: 35
Hi All,

Thank you Jason for this article, it has been very helpful.

We are having a similar problem to the one JayK described on 8/16/2011 regarding formatting the body of the email. Everything else works fine.

Similar to JayK, we are passing a string to @emailBODY with HTML "line break" tags to separate paragraphs but no matter what we do, the text in the body of the email displays as one long string.

Apparently JayK was able to get this to work. Can JayK or anyone else shed any light on this?

Thank you.

John
Post #1213374
Posted Tuesday, November 29, 2011 9:41 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, September 4, 2014 7:02 AM
Points: 17, Visits: 157
<br /><br />

Was JayK's solution. Did it not work for you?
Post #1213381
Posted Tuesday, November 29, 2011 9:45 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Saturday, September 13, 2014 7:14 AM
Points: 2,717, Visits: 3,849
dguthrie_2010 (11/29/2011)
Hi All,

Thank you Jason for this article, it has been very helpful.

We are having a similar problem to the one JayK described on 8/16/2011 regarding formatting the body of the email. Everything else works fine.

Similar to JayK, we are passing a string to @emailBODY with HTML "line break" tags to separate paragraphs but no matter what we do, the text in the body of the email displays as one long string.

Apparently JayK was able to get this to work. Can JayK or anyone else shed any light on this?

Thank you.

John


Paste the @emailBody value here within code .. /code tags.


______________________________________________________________________

Personal Motto: Why push the envelope when you can just open it?

If you follow the direction given HERE you'll likely increase the number and quality of responses you get to your question.

Jason L. Selburg
Post #1213390
Posted Tuesday, November 29, 2011 10:13 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, December 8, 2011 4:42 PM
Points: 7, Visits: 35
This is what we are testing:

@emailBODY = 'first&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;second&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;third'

Post #1213424
Posted Tuesday, November 29, 2011 10:18 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, September 4, 2014 7:02 AM
Points: 17, Visits: 157
@emailBODY = 'first
<br /><br /><br />
second
<br /><br /><br />
third'

Post #1213428
Posted Tuesday, November 29, 2011 10:27 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Saturday, September 13, 2014 7:14 AM
Points: 2,717, Visits: 3,849
cgrammont (11/29/2011)
@emailBODY = 'first
<br /><br /><br />
second
<br /><br /><br />
third'



Just to be clear, there is no need for the actual line breaks. So this should work fine..

@emailBODY = 'first<br /><br /><br />second<br /><br /><br />third'



______________________________________________________________________

Personal Motto: Why push the envelope when you can just open it?

If you follow the direction given HERE you'll likely increase the number and quality of responses you get to your question.

Jason L. Selburg
Post #1213434
Posted Tuesday, November 29, 2011 10:29 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, September 4, 2014 7:02 AM
Points: 17, Visits: 157
True. I was just adapting the solution to what he already posted.
Post #1213436
Posted Tuesday, November 29, 2011 11:07 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, December 8, 2011 4:42 PM
Points: 7, Visits: 35
Jason,

Your second code block is exactly what I am trying. But, in the body of the email, it renders:

FirstSecondThird


We are using 2008 if that matters.
Post #1213452
Posted Tuesday, November 29, 2011 11:18 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, September 9, 2014 1:34 PM
Points: 219, Visits: 658
Try this:

DECLARE @crlf char(2) = CHAR(13) + CHAR(10)
SELECT @emailBODY = 'first' + @crlf + 'second' + @crlf + 'third'

Note: for paragraphs, just double the @crlf, i.e.

SELECT @emailBODY = 'first' + @crlf + @crlf + 'second' + @crlf + @crlf + 'third'



Zycon - The Search Engine for Manufacturers. Helping Engineers and Technical Buyers Locate Aluminum Extrusions, Metal Stampers, Plastic Fabricators, Valves, and More.
Post #1213460
Posted Tuesday, November 29, 2011 11:56 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, December 8, 2011 4:42 PM
Points: 7, Visits: 35
Matthew,

Thank you! This works well!

And to everyone else, thanks for your responses also.

John
Post #1213473
« Prev Topic | Next Topic »

Add to briefcase «««678910»»»

Permissions Expand / Collapse