Re: [PHP] php.ini & ini_set

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


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-01-2006
Chris
 
Posts: n/a
Default 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/
Reply With Quote
  #2 (permalink)  
Old 11-01-2006
Beauford
 
Posts: n/a
Default RE: [PHP] php.ini & ini_set

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
Reply With Quote
  #3 (permalink)  
Old 11-01-2006
Chris
 
Posts: n/a
Default 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/
Reply With Quote
  #4 (permalink)  
Old 11-01-2006
Beauford
 
Posts: n/a
Default RE: [PHP] php.ini & ini_set

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
Reply With Quote
  #5 (permalink)  
Old 11-01-2006
Chris
 
Posts: n/a
Default Re: [PHP] php.ini & ini_set

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/
Reply With Quote
  #6 (permalink)  
Old 11-01-2006
M.Sokolewicz
 
Posts: n/a
Default Re: [PHP] php.ini & ini_set

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

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 08:37 AM.


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