Text formatting issues...
Posted: Tue Apr 19, 2005 5:55 am
Hi can anyone help?
I am trying to send an email in text format but I cannot get all of my values to display at equal intervals on the page without manually altering the tab amounts for each label. I intend to use the $emess variable in a loop but the labels may differ in length and I would like to display all values in the same area on the page without using HTML...
Does anyone no of an easy way this can be done?
Thanks Ian...
I am trying to send an email in text format but I cannot get all of my values to display at equal intervals on the page without manually altering the tab amounts for each label. I intend to use the $emess variable in a loop but the labels may differ in length and I would like to display all values in the same area on the page without using HTML...
Does anyone no of an easy way this can be done?
Code: Select all
<pre>
<?
$value1='test data1';
$value2='test data2';
$value3='test data3';
$value4='test data4';
$to = "someone@somewhere.com";
$subject = "My subject";
$emess= "Test1:\t$value1\n";
$emess.= "Long label2:$label2\t$value2\n";
$emess.= "3:$label3\t$value3\n";
$emess.= "Test4:$label4\t$value4\n";
$headers .= "My Website <web@mysite.com>\r\n";
mail($to, $subject, $emess, $headers);
echo"$emess";
?>
</pre>