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.
Matthew1980
10:46 pm on Sep 1, 2010 (gmt 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
wesg
2:08 am on Sep 2, 2010 (gmt 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.
Matthew1980
10:09 am on Sep 2, 2010 (gmt 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...