[nycphp-talk] How to override header info in mail
Phil Powell
soazine at erols.com
Sat Nov 30 14:42:21 EST 2002
Ok, taking out the header() part and doing this:
if (!mail($to, $subject, $body, "From: " . $from . "\\r\
Content-type " .
$contentType)) {..}
Did not produce an error, however, the email format remained unchanged when
I tested it by changing "HTML" to "Plain Text" in my form.. sorry, that did
nothing.
What I'm trying to do is to ensure that if you click onto the "Plain Text"
radio button that the email that is sent will be plain text, not HTML.
URL: http://valsignalandet.com/ and then click onto the "Recommend" link at
the top if you want to see it in action
Phil
----- Original Message -----
From: "Sterling Hughes" <sterling at bumblebury.com>
To: "NYPHP Talk" <talk at nyphp.org>
Sent: Saturday, November 30, 2002 2:13 PM
Subject: Re: [nycphp-talk] How to override header info in mail
> > I am using this line:
> >
> > if (!mail($to, $subject, $body, "From: " . $from . ";" .
header("Content-type " . $contentType))) {..}
> >
> > to use the mail() function in PHP to send simple text/plain or text/html
email. However, upon attempting to send I get a warning message indicating
that header information has already been set prior to emailing.
> >
> > Is there a way to overwrite only certain header information prior to
emailing to ensure the content-type of the email being either text/plain or
text/html?
> >
>
> you shouldn't be calling the header function - header() is meant to
> set HTTP Headers (also, mail headers are not delimited by a semi-colon,
> but by carriage return, newline).
>
> -Sterling
>
>
> > Just wondering
> > Thanx
> > Phil
> >
> >
> >
> >
> >
> >
>
>
> --- Unsubscribe at http://nyphp.org/list/ ---
>
>
More information about the talk
mailing list