Here's how I sometimes pad my mail body and such. Here's an example :
$string = 'This is a really long string that I want to email to a friend
but also want to alter the width of it for my email so I use function
padString to set such a width. It strips extra whitespace too.
and returns like
this are removed';
$mail_body = padString($string,20);
mail("to@a.org","subject","$mail_body","From: from@a.org");
it's a nice function... but I dont think this covers my "problem"... cuz it's all about identation of the CODE not the email body... the thing I should do (I got the idea from your post) is...
$string="this a is huge string that I don't to show in on line of code because it would\n
really suck and make it almost impossible to read.\n
So I'm declaring it here using all the tabs I want to later processing.";
$new_str=stripTabs($string);
mail($email,$my_email,$subj,$new_str);
....
I think... cuz the only problem in the $string is all the tabs used in identation, if I can just do some code to strip them of I can ident the string anyway I want...
____________________________
. Christian Dechery (lemming)
.
http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer