Marc, Try changing your WHILE loop to an IF/ENDIF with GOTO.
You need to be careful about invoking certain operations, such as RUN, within a WHILE loop. PLUGIN may be one of those. Emmitt Dove Manager, DairyPak Business Systems Evergreen Packaging, Inc. [EMAIL PROTECTED] [EMAIL PROTECTED] (203) 643-8022 -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Marc Sent: Thursday, August 14, 2008 9:15 AM To: RBASE-L Mailing List Subject: [RBASE-L] - Re: Email boddy HI If I run Dawn's code it works fine, so I have tried cutting and pasting parts of her code into mine but mine still would not work. I am using a While loop so I pasted her code inside mine to test. The first pass the body of my email does not have the line feeds but hers does. Then on the second pass mine stays formatted. So it seems there is something in Dawn's code that forces mine to format on the second pass through the loop but I have not spotted yet. WHILE SQLCODE <> 100 THEN -- my code does not format the body the first pass but second pass works -- I guess my code is teachable and learns from the master!!! SET VAR vbody TEXT = + (.vfname & .vlname +.vreturn + + 'Your estimate balance is..'& (CTXT(.vtotpt)) +.vreturn + .vreturn+ + 'Your last visit was on ...'& (CTXT(.vdatelch)) + .vreturn + .vreturn + + 'Last personal payment on ...'& (CTXT(.vdatelpay)) + .vreturn + + 'Amount of payment ....'& (CTXT(.vamtperpd)) +(CHAR(013)) ) SET VAR vbody = ('Body:' + .vbody) SET VAR vparameters = + (.vquote+'vResult' +.vpipe + 'To: '+.vpatemail + .vpipe + + 'Subject: '+.vsubject + .vpipe + + 'Body: '+.vbody + .vquote) PLUGINS mapimail2.rbl &vparameters -- Dawns code.... of course works each time Notice vbody2 and vparameters2 on Dawn's code -- I am going to keep changing Dawn's code one var at a time to see which one makes the -- difference SET VAR vresult TEXT SET VAR vreturn TEXT = ((CHAR(13))+(CHAR(10))) SET VAR vemailaddress = '"Dawn Hast" <[EMAIL PROTECTED]>' SET VAR vquote TEXT = (CVAL('QUOTES')) SET VAR vpipe TEXT = '|' SET VAR vto TEXT = ('To:'+.vemailaddress) SET VAR vsubject = 'Subject: Test' SET VAR vfname = 'Dawn' SET VAR vlname = 'Hast' SET VAR vtotpt = '$100.00' SET VAR vdatelch DATE = 08/12/08 SET VAR vdatelpay DATE = 08/11/08 SET VAR vamtperpd = '$20.00' SET VAR vbody2 TEXT = + (.vfname & .vlname +.vreturn + + 'Your estimate balance is..'& (CTXT(.vtotpt)) +.vreturn + .vreturn+ + 'Your last visit was on ...'& (CTXT(.vdatelch)) + .vreturn + .vreturn + + 'Last personal payment on ...'& (CTXT(.vdatelpay)) + .vreturn + + 'Amount of payment ....'& (CTXT(.vamtperpd)) +(CHAR(013)) ) SET VAR vbody2 = ('Body:' + .vbody2) SET VAR vparameters2 TEXT = (.vquote+'vResult' + .vpipe + .vto + .vpipe + + .vsubject + .vpipe + .vbody2 + .vquote) PLUGINS mapimail2.rbl &vparameters2 FETCH c2 + ----- Original Message ----- From: "Stephen Markson" <[EMAIL PROTECTED]> To: "RBASE-L Mailing List" <[email protected]> Sent: Wednesday, August 13, 2008 6:27 PM Subject: [RBASE-L] - Re: Email boddy Have you tried using CHAR(10) + CHAR(13) or just CHAR(10) by itself? I believe only MAC OS uses CHAR(13) alone as the newline character. Regards, Stephen Markson ForenSys The Forensic Systems Group www.ForenSys.ca 416 512 6950 -----Original Message----- From: "Marc" < [EMAIL PROTECTED]> To: [email protected] (RBASE-L Mailing List) Date: Tue, 12 Aug 2008 11:32:00 -0500 Subject: [RBASE-L] - Email boddy Hi I am having problems getting the body of the email to format the way I want. This is my last try SET VAR vReturn TEXT = ((CHAR(13))+(CHAR(10))) SET VAR vbody TEXT = + (.vfname & .vlname +(CHAR(013))+ + 'Your estimate balance is..'& (CTXT(.vtotpt)) +.vReturn + .vReturn+ + 'Your last visit was on ...'& (CTXT(.vdatelch)) + .vReturn + .vReturn + + 'Last personal payment on ...'& (CTXT(.vdatelpay)) + .vReturn + + 'Amount of payment ....'& (CTXT(.vamtperpd)) +(CHAR(013)) ) I want to have 5 lines Name ... Your estimate balance is ... and so on. What am I missing? Thanks Marc

