How can I set mail sender for each website? Now all e-mails sent through the PHP mail() function have a sender like: but I would like something like that is: Set the email headers, as described below, has no effect... PHP: ... $from = "[email protected]"; $headers = "From: " . $from . "\r\n"; $headers .= "Reply-To: " . $from . "\r\n"; $headers .= "Return-Path: " . $from . "\r\n"; ... if (mail($to, $subject, $body, $headers)) { ... ... the recipient smtp server sees: I'm using Debian6 + ISPConfig3.0.5.3 + Postifix2.7.1 Thanks.
You could set the sender as admin in the website options tab -> php.ini There you could enter something like: sendmail_path = sendmail -t -i -f [email protected]
Hi Croydon, I tried sendmail_path = sendmail -t -i -F [email protected] and also sendmail_from = [email protected] with no luck. I also checked that php.ini of the website (/var/www/conf/web21 in the example) contain the changes and I found them, but it seems to have no effect.
Searching in vain for the meaning of the arguments I also found this way so I tried it and it works. PHP: mail($to, $subject, $message, $headers, "-f$from");