Hi Gordon,

> WITHOUT using HTML email - Is there a way to format it, so that all
> the characters are the same height/width... - No matter what the
> end-user uses for email..
>
> EG :-
>
> if I want to put numbers in, - EG :-
>
> Result1  95,776
> result2      4567
>
> the '67' comes EXACTLY under the '76' - even though the 2nd line has
> spaces in it (smaller width than numbers)....
>
> Im using PHPmailer as my main email programme...
There are two possibilities: the user has a plain text email client or the
user uses something with formatting. The first is easy, this usually uses a
fixed width text font, so just fill with spaces: calculate the length of the
strings and fill in the space that has to be left open with spaces.

If the user uses a HTML interpreting client, force it to use a fixed width
font using <pre>...</pre> and proceed as before.

Actually without HTML it is much easier, problem is these days you cannot
trust people anymore to not have an HTML based email client...

function fill($MessageString, $NumberOfSpaces) {
  for ($i=0;$i<$NumberOfSpaces;$i++) {
    $MessageString .= " ";
  }
}

Now in the procedure that creates the message to be sent ($MessageString)
feel free to use something like:
$MessageString .=
$Article.(fill($n)).$CurrencySymbol.(fill($m)).number_format($Amount,..,..,.
.,..);

where n and m are derved from the lengths of $Article and $Amount

Marc



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/HKFolB/TM
--------------------------------------------------------------------~-> 

Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to