mail - "from" not having any effect?

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 ...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-13-2006
Marnok.com
 
Posts: n/a
Default mail - "from" not having any effect?

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');


Reply With Quote
  #2 (permalink)  
Old 10-13-2006
Don Freeman
 
Posts: n/a
Default Re: mail - "from" not having any effect?


<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)


Reply With Quote
  #3 (permalink)  
Old 10-14-2006
Marnok.com
 
Posts: n/a
Default Re: mail - "from" not having any effect?


"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 :)


Reply With Quote
  #4 (permalink)  
Old 10-14-2006
.:[ ikciu ]:.
 
Posts: n/a
Default Re: mail - "from" not having any effect?

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();


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:07 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0