PDA

View Full Version : php.ini and mail questions


mavgh1
14th March 2006, 01:43
I'm running SuSe 9.3 with Postfix.

When I send mail from my site with mail() function I receive the email but the sender is From : www apache daemon.How can I change this tosomething else like www@www.domain.ro .
I,ve tried in /etc/php.ini to change
sendmail_path = /usr/sbin/sendmail -t -www@www.domain.ro but doesn,t work.

If I have some subdomains how can I personalize every mail sent from subdomains like subdomain1@domain.ro,subdomain2@domain.ro etc.
With Virtualhost doesn't work.

And the last question it is possible in Linux to hide php info ?(Safe mode =Off)
Browsing the Internet a couple of days doesn't bring me answers to my problems .

Thanks in advance for any help and hope that there are not too many questions in one post.

till
14th March 2006, 09:25
You can supply additional header infos to the php mail function:

mail($to, $subject, $message, "From: your@yourmail.com\n");

mavgh1
14th March 2006, 13:10
Thanks but not from php script I want to solve my problem.

falko
14th March 2006, 18:15
But that's the only way...

mavgh1
14th March 2006, 21:08
I solved the problem with phpinfo

Maybe I'm wrong but .....
I had a site hosted on a free host.When I send a email from that site without "From : " automatically the receiver of the email has a "from :" site@site.com.This is the reason why Im asking about configuring php.ini
Im not very sure but before I started this SuSe Server I read somewhere that if you have a domain and some subdomains for every subdomains you must have a php.ini(i dont know how to do this and in the last 3 days b rowsing the Internet didn't find anything about).