PDA

View Full Version : problems sending mail() with php


mavgh1
25th March 2006, 03:34
I have a SuSE Server with a domain.ro and some subdomains.domain.ro
When I use function mail() to send emails from my domain and subdomains the From : looks like

From : www daemon apache <user@domain.ro>
From : www daemon apache <subdomain@domain.ro>

Does anyone now what changes to make to have only email address in header(I don't want to use from header in php script).
Thanks

till
25th March 2006, 12:26
PLease have a look here:

http://www.howtoforge.com/forums/showpost.php?p=18982&postcount=2

mavgh1
25th March 2006, 12:55
I dont want to use php script .

till
25th March 2006, 13:05
I dont want to use php script .

But your original question was "problems sending mail() with php".

Please explain what you want to do and in which programming language do you want to use the mail() function.

mavgh1
25th March 2006, 19:41
I dont want to use From : in my php script
I put in php.ini sendmail_path = /usr/sbin/sendmail -t -i web@domain.ro
Or in main.conf in postfix i made a
sender_canonical_maps = hash:/etc/postfix/sender_canonical
In sender_canonical i put
wwwrun@domain.ro web@domain.ro

The result is the same the from looks like
From : www daemon apache <web@domain.ro>
I dont want to see www daemon apache only <web@domaim.ro>

mavgh1
26th March 2006, 03:53
I solved my problem.Now default (without from in php script) from server configuration
From : web@domain.ro for my domain
From : user@domain.ro for my subdomains

Thanks anyway