Why to you have double back slashes? Think you are replacing return with a "\" and then a linefeed. A least that is what I see in a quick ascii dump of a string.
Think you only need double backslashes in regex arguments. Steve On Feb 25, 2010, at 2:05 PM, Michael Check wrote: > We've been sending mails using a4d.sendmail with the same routine with > 2004 and a4d 4.5 > > Now with v11, a unicode db and a4d v5.0r15, that breaks. > > We found before that the char(10) in the emailFooter filed was killing > the sendmail library method. So we filtered it out as below, using > the char(13) and replacing them with text line feeds. Now that same > code breaks the sendmail routine and displays a blank screen: > > if([EM_event]emailFooter>"") > $emailFooter:=replace > string([EM_event]emailFooter;char(13);"\\n") > $emailFooter:=replace string($emailFooter;char(10);"") > $body := replace string($body;"$emailFooter";$emailFooter) > else > $body := replace string($body;"$emailFooter";"") > end if > > $text := "!write(\"" + $subject + "\\n" + $body + "\")" > > Maybe a unicode conversion issue? Not sure. > So is there a way (or a better way) to filter out all the bad chars in > the text variable stored in the db? > > The field [EM_event]emailfooter is entered via the web and stored in > the db. With no CR in that text field, it works fine. Add carriage > returns and it breaks. > > Any help or advice appreciated. > > Thanks, > > Michael Check > _______________________________________________ > Active4D-dev mailing list > [email protected] > http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev > Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/ _______________________________________________ Active4D-dev mailing list [email protected] http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/
