This is a discussion on Re: [PHP] php.ini & ini_set within the PHP General forums, part of the PHP Programming Forums category; Beauford wrote: > I am working on a website for a friend that is being hosted by a third party &...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Beauford wrote:
> I am working on a website for a friend that is being hosted by a third party > (which uses Linux) and I don't have access to the php.ini or any other > system files. > > The problem I am having is this. When an email is sent from the website and > the user receives it, it says it is from nobody@hosting.com instead of the > websites email address. How can I get it to say it is coming from the > website address. I do have access to a cgi bin, and maybe .htaccess if > something can be done with these. I thought though that I could use ini_set > to do this. http://www.php.net/mail Check the 5th parameter usage and associated comments. -- Postgresql & php tutorials http://www.designmagick.com/ |
|
|||
|
Can you be more specific. I only see 4 parameters and none of them apply.
-----Original Message----- From: Chris [mailto:dmagick@gmail.com] Sent: October 31, 2006 9:13 PM To: Beauford Cc: PHP Subject: Re: [php] php.ini & ini_set Beauford wrote: > I am working on a website for a friend that is being hosted by a third > party (which uses Linux) and I don't have access to the php.ini or any > other system files. > > The problem I am having is this. When an email is sent from the > website and the user receives it, it says it is from > nobody@hosting.com instead of the websites email address. How can I > get it to say it is coming from the website address. I do have access > to a cgi bin, and maybe .htaccess if something can be done with these. > I thought though that I could use ini_set to do this. http://www.php.net/mail Check the 5th parameter usage and associated comments. -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php |
|
|||
|
Beauford wrote:
> Can you be more specific. I only see 4 parameters and none of them apply. Oops sent you to the wrong page. http://www.php.net/manual/en/function.mail.php There are 5 parameters: bool mail ( string to, string subject, string message [, string additional_headers [, string additional_parameters]] ) Look for this: additional_parameters (optional) and look at example 3. -- Postgresql & php tutorials http://www.designmagick.com/ |
|
|||
|
That doesn't work.
Here is what I have. mail($email,$subject,$body,$from); Which is (senders address, the subject, the body of the message, and the from address) The from address is taken from this, and I added the -f in front of it. define("regaddress", "-fregistrar@totalcomputercare.ca"); It still says it comes from: Nobody [nobody@host.hosting.com]; on behalf of; Registrar [-fregistrar@mycompany.ca] Thanks -----Original Message----- From: Chris [mailto:dmagick@gmail.com] Sent: October 31, 2006 9:38 PM To: Beauford Cc: 'PHP' Subject: Re: [php] php.ini & ini_set Beauford wrote: > Can you be more specific. I only see 4 parameters and none of them apply. Oops sent you to the wrong page. http://www.php.net/manual/en/function.mail.php There are 5 parameters: bool mail ( string to, string subject, string message [, string additional_headers [, string additional_parameters]] ) Look for this: additional_parameters (optional) and look at example 3. -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php |
|
|||
|
Beauford wrote:
> That doesn't work. > > Here is what I have. > > mail($email,$subject,$body,$from); > > Which is (senders address, the subject, the body of the message, and the > from address) > > The from address is taken from this, and I added the -f in front of it. > define("regaddress", "-fregistrar@totalcomputercare.ca"); > > It still says it comes from: > Nobody [nobody@host.hosting.com]; on behalf of; Registrar > [-fregistrar@mycompany.ca] That's something different entirely to what your original email said. Your mail server is adding that, it's not a php setting you can change. If you look at the mail source, it will have an extra header in there (can't remember what it is but check against this email - something like "Sender" or "Sender-Address"). -- Postgresql & php tutorials http://www.designmagick.com/ |
|
|||
|
Why can't you just add a
From: Registrar <registrar@mycompany.ca> header? =/ - tul Chris wrote: > Beauford wrote: >> That doesn't work. >> >> Here is what I have. >> >> mail($email,$subject,$body,$from); >> Which is (senders address, the subject, the body of the message, and the >> from address) >> >> The from address is taken from this, and I added the -f in front of it. >> define("regaddress", "-fregistrar@totalcomputercare.ca"); >> >> It still says it comes from: >> Nobody [nobody@host.hosting.com]; on behalf of; Registrar >> [-fregistrar@mycompany.ca] > > That's something different entirely to what your original email said. > > Your mail server is adding that, it's not a php setting you can change. > > If you look at the mail source, it will have an extra header in there > (can't remember what it is but check against this email - something like > "Sender" or "Sender-Address"). > |