Re: How to override header info in mail()
| From: | Paul Nicholson | Date: | Sat, 30 Nov 2002 18:46:48 +0000 |
| Subject: | Re: How to override header info in mail() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-126557@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hey,
The correct way of doing that is:
if (!mail($to, $subject, $body, "From: ". $from ."\r\nContent-type".
$contentType)) {..}
HTH!
~Paul
On Saturday 30 November 2002 12:58 pm, Phil Powell wrote:
> 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
- --
~Paul Nicholson
Design Specialist @ WebPower Design
paul@webpowerdesign.net
www.webpowerdesign.net
"The web....the way you want it!"
"It said uses Windows 98 or better, so I loaded Linux!"
Registered Linux User #183202 using Register Linux System # 81891
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE96QeuDyXNIUN3+UQRAkFEAJ0SBT8VZMHitu4zOOb+cf3jaRCX7QCffEpD
txhpy024829NozyhYq6H3Fk=
=Szfo
-----END PGP SIGNATURE-----