philphanluvr@hotmail.com wrote:[color=blue]
> Unfortunately it requires installing Pear, more than I bargained for.
> Any other alternative?[/color]
1. Find an HTML email somewhere in your inbox.
2. View source.
3. Look at how the message is formed.
4. Form a message that resembles it structurally. For the bulk of the
body, "heredoc" syntax is your friend. What you want to do is build the
body as one long string, with the variables you want inserted in the
appropriate places, just like you would if you were making a web page.
Then pay attention to the headers that define it as a MIME message with
HTML contents, as well as any MIME separators in the message itself.
You'll need to add those headers using the API of whatever mail call you
use, and add the in-message separators manually to the body of the message.
5. Send the mesaage.
6. Make sure it arrives and displays properly in a couple of
representative mail programs. Some mail programs are more forgiving of
little MIME mistakes than others.
6. After you do this a few times with convoluted, cranky code to get the
headers and separators working just right, see if you can use PEAR's
Mail_mime in the future. It's installed by default with newer releases
of PHP, and isn't too difficult to install otherwise as long as you have
control over php.ini. If your web host can't or won't support PEAR, ask
yourself why.
[color=blue]
>
> sk <steve-no-spam@hatless-dot-com-without-the-spam.com> wrote in message news:<nk3kb.579409$Oz4.558595@rwcrnsc54>...
>[color=green]
>>The PEAR Mail_mime module is pretty great for this. It makes generating
>>even multipart/alternative mail with inline image attachments easy.
>>
>>Head over to
http://pear.php.net
>>
>>--
>>Steve Koppelman
>>
http://www.hatless.com/
>>
>>philphanluvr@hotmail.com wrote:
>>[color=darkred]
>>>How do I sent content of a PHP form via HTML email?
>>>
>>>For example, fields $name, $city, $state, $phone, $location
>>>
>>>to HTML:
>>>
>>><p>Congratulations $name from $city, $state with the phone # $phone .
>>>You now get an expense paid trip to $location .
>>>
>>>And that HTML outputted in email..so someone checks their email,they
>>>have an HTMl certificate generated from a form in PHP.[/color][/color][/color]