NYCPHP Meetup

NYPHP.org

[PHP] How to override header info in mail()

Paul Nicholson paul at webpowerdesign.net
Sat Nov 30 13:46:48 EST 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hey,
The correct way of doing that is:
if (!mail($to, $subject, $body, "From: ". $from ."\\r\
Content-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 at 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-----



More information about the talk mailing list