This is a discussion on mail - "from" not having any effect? within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hi again, Trying to send an email today. Sends fine, but the "From:" part is apparently ignored. The ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi again,
Trying to send an email today. Sends fine, but the "From:" part is apparently ignored. The message is always "from" the default address for my hosting package. Is this likely to be an ini problem or some setting enforced by my web hosts? Or am I doing something wrong? the whole thing looks like this (names have been changed to protect the innocent, of course) mail('a@b.com',' test',' hello world', 'From: <someone@somewhere.com>'); I've also tried 'From: someone@somewhere.com'); |
|
|||
|
<usenet@isotopeREEMOOVEmedia.com> wrote in message news:pg7vi2t0rf1fj0hbk605qju1aqmba5i3un@4ax.com... > On Fri, 13 Oct 2006 12:47:52 +0100, "Marnok.com" > <wizardharry@pottermarnok.com> > wrote: > >>Hi again, >> >>Trying to send an email today. Sends fine, but the "From:" part is >>apparently ignored. The message is always "from" the default address for >>my >>hosting package. >> >>Is this likely to be an ini problem or some setting enforced by my web >>hosts? Or am I doing something wrong? >> >>the whole thing looks like this (names have been changed to protect the >>innocent, of course) >> >>mail('a@b.com',' test',' hello world', 'From: <someone@somewhere.com>'); >> >> >>I've also tried >>'From: someone@somewhere.com'); >> > > Append "\r\n" or "\n" as appropriate for your system. > > http://us2.php.net/manual/en/function.mail.php .. The manual states that the newline is to be added to separate multiple additional_headers and example 3 only shows a newline after the first 2 but not after the third and last one. The OP only has one additional header so I am curious as to whether this worked or not for them. Thanks, -Don -- Ever had one of those days where you just felt like: http://cosmoslair.com/BadDay.html ? (Eating the elephant outside the box, one paradigm at a time) |
|
|||
|
"Don Freeman" <freemand@sonic.net> wrote in message news:452fbccc$0$96166$742ec2ed@news.sonic.net... > > <usenet@isotopeREEMOOVEmedia.com> wrote in message > news:pg7vi2t0rf1fj0hbk605qju1aqmba5i3un@4ax.com... >> On Fri, 13 Oct 2006 12:47:52 +0100, "Marnok.com" >> <wizardharry@pottermarnok.com> >> wrote: >> >>>Hi again, >>> >>>Trying to send an email today. Sends fine, but the "From:" part is >>>apparently ignored. The message is always "from" the default address for >>>my >>>hosting package. >>> >>>Is this likely to be an ini problem or some setting enforced by my web >>>hosts? Or am I doing something wrong? >>> >>>the whole thing looks like this (names have been changed to protect the >>>innocent, of course) >>> >>>mail('a@b.com',' test',' hello world', 'From: <someone@somewhere.com>'); >>> >>> >>>I've also tried >>>'From: someone@somewhere.com'); >>> >> >> Append "\r\n" or "\n" as appropriate for your system. >> >> http://us2.php.net/manual/en/function.mail.php > . > The manual states that the newline is to be added to separate multiple > additional_headers and example 3 only shows a newline after the first 2 > but not after the third and last one. The OP only has one additional > header so I am curious as to whether this worked or not for them. > > Thanks, > -Don > -- > Ever had one of those days where you just felt like: > http://cosmoslair.com/BadDay.html ? > (Eating the elephant outside the box, one paradigm at a time) > This did in fact work, unless I changed something else and corrected an error at the same time in trying this! \n alone worked fine, I can now spam myself and pretend it wasn't me :) |
|
|||
|
Hmm Marnok.com <wizardharry@pottermarnok.com> wrote:
> mail('a@b.com',' test',' hello world', 'From: > <someone@somewhere.com>'); you should to use headres -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Ikciu | gg: 718845 | yahoo: ikciu_irsa | www: www.e-irsa.pl 2be || !2be $this => mysql_query(); |