NYCPHP Meetup

NYPHP.org

[nycphp-talk] How to override header info in mail

Sterling Hughes sterling at bumblebury.com
Sat Nov 30 15:05:29 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
> 

I'd say this is a logic error in your script, the form is properly setting the
content-type header, check to make sure that you've properly set $contentType.

-Sterling



More information about the talk mailing list