NYCPHP Meetup

NYPHP.org

How to override header info in mail()

Phil Powell soazine at erols.com
Sat Nov 30 12:58:08 EST 2002


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?

Just wondering
Thanx
Phil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20021130/280fa34b/attachment.html>


More information about the talk mailing list