Re: mail

From: Steve (ThisOne_at_Aint.valid)
Date: 03/20/05


Date: Sun, 20 Mar 2005 12:29:18 +1200

Rick wrote:
> "TekWiz" <tekwiz@twarlick.net> wrote in message
> news:d1i9jj$8cn$1@aunews.duc.auburn.edu...
>
>>Rick wrote:
>>
>>>Is there a way to use these two types of coding in the Mail function of
>>>PHP?
>>>
>>> Thanks for any help you can give it is most appreciated!!
>>>
>>> money_format('%i', $total)
>>>
>>>and
>>>
>>>print " <tr class=orderpage> \n";
>>>print " <td align=center>$CSQTY</td>\n";
>>>print " <td>COLD SORES</td>\n";
>>>print " <td>\$20.00</td>\n";
>>>print " <td>&nbsp;</td>\n";
>>>print " <td>\$$CST</td>\n";
>>>print " </tr>\n";
>>>
>>>
>>>
>>
>>I'm not sure I understand your question, but I think this may answer it...
>>
>>When mail() executes, it simply uses parameters to write the "source code"
>>for an email and sends that (in some fashion) to the sendmail program on
>>the server; so, if you want to have HTML in your message, simply include
>>HTML code in the string $message that you put into the mail() function.
>>
>>If your question is about putting dynamic PHP code into an email. This is
>>impossible unless a clients computer is specifically set up to execute PHP
>>code from emails, and I don't know of anyone who does this. Email can only
>>be static text/html code.
>>
>>It is possible to have JScript and Java, but these are MAJOR security
>>concerns and most people now have these functions turned off. Outlook
>>Express and Firefox both install default with JScript and Java turned off.
>>
>>FYI, here is the documentation for the mail function from the PHP manual.
>>
>>bool mail ( string to, string subject, string message [, string
>>additional_headers [, string additional_parameters]] )
>>
>>Let me know if this didn't answer your question.
>>
>>--TekWiz
>
>
>
> No I am sorry I must not have been clear.
>
> Here is what I want. The code on my web server would be
>
> money_format('%i', $total)
>
> or
>
> print " <tr class=orderpage> \n";
> print " <td align=center>$CSQTY</td>\n";
> print " <td>COLD SORES</td>\n";
> print " <td>\$20.00</td>\n";
> print " <td>&nbsp;</td>\n";
> print " <td>\$$CST</td>\n";
> print " </tr>\n";
>
> but when the email comes in to the client it would look like this
>
> 65.25
>
> or
>
> <tr class=orderpage>
> <td align=center>15</td>
> <td>COLD SORES</td>
> <td>$20.00</td>
> <td>&nbsp;</td>
> <td>46.25</td>
> </tr>
>
>
No, you didn't understand the answer! The body of an email is a string.
Build it up in any way that you want and then send it using the mail()
function. Look at '.', sprintf, and a million other manipulation
functions to get the string built.

Also look into how to handle sending html in an email.

Steve



Relevant Pages

  • Re: mail
    ... > HTML code in the string $message that you put into the mailfunction. ... > impossible unless a clients computer is specifically set up to execute PHP ... > Express and Firefox both install default with JScript and Java turned off. ... here is the documentation for the mail function from the PHP manual. ...
    (comp.lang.php)
  • Re: mail
    ... simply include HTML code in the string $message that you put into the ... If your question is about putting dynamic PHP code into an email. ... Express and Firefox both install default with JScript and Java turned off. ... here is the documentation for the mail function from the PHP manual. ...
    (comp.lang.php)
  • Re: How to strip html code?
    ... I am trying to strip all html code from a string using php. ...
    (php.general)
  • How to strip html code?
    ... I am trying to strip all html code from a string using php. ... tried strip_tagsand several other functions but get no luv. ...
    (php.general)
  • Re: How to strip html code?
    ... I am trying to strip all html code from a string using php. ... tried strip_tagsand several other functions but get no luv. ...
    (php.general)