Re: Re: mail function
| From: | Peter | Date: | Fri, 21 Dec 2001 07:29:28 +0000 |
| Subject: | Re: Re: mail function | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-78428@lists.php.net to get a copy of this message | ||
Sorry but I am a bit of a newbie at this.
So do you mean that I am supposed write it like this?
else
{
$mailheaders = "From: $email\r\n";
$mailheaders .= "Reply-To: $email\r\n";
$mailheaders .= "Content-Type: text/html; charset=iso-8859-1\r\n";
$remarks .= "<br><br>$items";
mail("yungp@netvigator.com", "quotation enquiry", $remarks,
"from: \"$yourname\"
<$youremail>\r\n"
"Content-Type: multipart/mixed;
boundary=\"------------15E3B1D587950C2CAADCBF93\"
This is a multi-part message in MIME format.
--------------15E3B1D587950C2CAADCBF93
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit);
header("Location: http://www.winwhole.com.hk/sent.php");}
};
On Fri, 21 Dec 2001, jtjohnston wrote:
> If you declare a header after you used html or echoed something, it will fail.
>
> header("Location:
> http://www.winwhole.com.hk/sent.php")
>
> HTH.
> Here is some code that works:
>
> <?php
> session_name("ESLpostcard");
> session_start();
>
> $img_encoded = base64_encode($image_data);
>
> mail($theiremail, "You Have A Christmas Postcard", "", "from:
> \"$yourname\"
> <$youremail>\r\n"
> ."Content-Type: multipart/mixed;
> boundary=\"------------15E3B1D587950C2CAADCBF93\"
>
> This is a multi-part message in MIME format.
> --------------15E3B1D587950C2CAADCBF93
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
>
> $yourmessage
>
> --------------15E3B1D587950C2CAADCBF93
> Content-Type: image/png;
> name=\"postcard10.png\"
> Content-Transfer-Encoding: base64
> Content-Disposition: inline;
> filename=\"postcard10.png\"
>
> $img_encoded
> --------------15E3B1D587950C2CAADCBF93--
>
> ");
>
> ?>
>
>
>
>
>
>