Re: How to override header info in mail()

From: Date: Sun, 01 Dec 2002 00:33:22 +0000
Subject: Re: How to override header info in mail()
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-126580@lists.php.net to get a copy of this message
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 ok, what is on line 13 and on line 104? That error is saying that you have a header() call on line 104 that I don't think should be there(The header command is not used with mail)....if it should you'll have to look at output buffering. ~Pauly http://php.net/manual/en/function.header.php http://php.net/manual/en/function.mail.php http://php.net/manual/en/ref.outcontrol.php On Saturday 30 November 2002 02:37 pm, Phil Powell wrote: > I'm sorry that didn't work either.. here is my error: > > Warning: Cannot add header information - headers already sent by (output > started at /users/ppowell/web/recommend.php:13) in > /users/ppowell/web/recommend.php on line 104 > > > Phil > ----- Original Message ----- > From: "Paul Nicholson" <paul@webpowerdesign.net> > To: "Phil Powell" <soazine@erols.com>; <talk@nyphp.org>; > <php-general@lists.php.net> > Sent: Saturday, November 30, 2002 1:46 PM > Subject: Re: [PHP] How to override header info in mail() > > > 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 iD8DBQE96VjYDyXNIUN3+UQRArAqAKCLtc0i7iNJyCcZ14/midkP3JFZXACaAgfk FBrQwCIlYgxRyj9UFNhh4HQ= =XosZ -----END PGP SIGNATURE-----

« previous php.general (#126580) next »