How to override header info in mail()

From: Date: Sat, 30 Nov 2002 17:58:08 +0000
Subject: How to override header info in mail()
Groups: php.general 
Request: Send a blank email to php-general+get-126549@lists.php.net to get a copy of this message
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

« previous php.general (#126549) next »