Re: Send HTML email
| From: | Bernie Huang | Date: | Thu, 29 Jun 2000 23:10:34 +0000 |
| Subject: | Re: Send HTML email | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-3919@lists.php.net to get a copy of this message | ||
Nick Catalano wrote:
> This is basic, since all HTML mail is, is well, a HTML page sent through a
> mail server... so you can include forms in it, just like on a normal PHP
> page... example follows:
>
> <?php
> mail($mail_to, $mail_subject, "
> ?>
> <!--
> Hello?? Your Email program Does NOT Support HTML Email!!!
> Upgrade for gods sake!!!
> --->
> <html>
> <head>
> <title> etc... etc... etc... etc... etc...
>
> <?php
> ", "Content-Type: text/html\n From: $mail_from\n");
> ?>
> ----- Original Message -----
> From: "Bernie Huang" <bernie.huang@ec.gc.ca>
> To: "PHP list" <php-general@lists.php.net>
> Sent: Thursday, June 29, 2000 4:53 PM
> Subject: [PHP] Send HTML email
>
> > Hi,
> >
> > Yet another common question. =)
> > I am writing a PHP script and am trying to send an HTML email use PHP
> > function 'mail()'. What I want to do is to include a clickable form or
> > an embedded url (haven't decide which one to use, but hope to hear some
> > suggestions) in the email, so that the user can click on the button or
> > url to do some sort of submitting action. How can I do it?
> >
> > Thanks.
> >
> >
> > - Bernie
> >
> >
>
> ----------------------------------------------------------------------------
> ----
>
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> > For additional commands, e-mail: php-general-help@lists.php.net
> > To contact the list administrators, e-mail: php-list-admin@lists.php.net
I guess this didn't work.
Code:
if ($email)
{
$subject = "Whatever";
$message = "<html><body>This is a test.<form><input
type=\"reset\"
value=\"Reset\"></form></body></html>";
mail($row[email], $subject, $message, 'Content-Type: text/html\n From:
who@whoever.who');
}
Email I received:
<html><body>This is a test.<form><input type="reset"
value="Reset"></form></body></html>
What's happening? I put in the header 'Contect...'?
- Bernie