Welcome to WebmasterWorld Guest from 54.227.126.69

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Change PHPinfo local settings

specifically sendmail_from

     
8:25 pm on Sep 1, 2010 (gmt 0)

Junior Member

5+ Year Member

joined:Jan 30, 2008
posts:104
votes: 0


phpinfo() displays both local and global settings, and I want to change a local setting. Mail() is sending from the wrong from address and I'd like to modify it. I changed the main php.ini but that has only modified the global settings.

Where else can I find the sendmail_path setting? I also checked the .htaccess files but none had anything.
10:46 pm on Sept 1, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:Feb 22, 2009
posts:1396
votes: 0


Hi there wesg,

[mail function]
; For Win32 only.
; h t tp://php.net/smtp
SMTP = localhost
; h t t p://php.net/smtp-port
smtp_port = 25

; For Win32 only.
; h t t p://php.net/sendmail-from
sendmail_from = your@yourdomain


Note: I have put spaces into the http part so that the message doesn't get minced about...

Alter the bolded text, then restart the server, I just tried this and it seems to do the trick, also ctrl+F5 your browser so that the information being called/displayed isn't cached from a previous try.

And for reference (though I guess you have already looked here): [uk3.php.net ]

I hope I understood you correctly too :)

Cheers,
MRb
2:08 am on Sept 2, 2010 (gmt 0)

Junior Member

5+ Year Member

joined:Jan 30, 2008
posts:104
votes: 0


Thanks for the reply, MRB, but that will change the global setting, not the local one I want to modify. It seems that PHP uses the local setting when sending email, and I don't want it to.
10:09 am on Sept 2, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:Feb 22, 2009
posts:1396
votes: 0


Hi there wesg,

If you are using the mail function: [uk.php.net ] then the 'send mail' is specified in the first parameter of the mail function, or stored in a variable (or constant) and referenced in the first parameter of the mail function, this will then send an email to that address.

Other than that I am unsure as to what you are actually having trouble with.
Cheers,
MRb

I am basing this on the assumption that you are using mail() to send an email, post the code you are having issues with, and from that we shall see if there is anything wrong...
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members