Re: PHP sends email from Apache virtual hosts with apache@machine

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Hi all,
>
> I'm running Apache with virtual hosts and I have a few domains which are
> running PHP messageboards.
>
> Now when these PHP scripts call Mail() to send emails the emails are
> getting sent with an evelope sender of apache@xxxxxxxxxxxxxxx
>
> Is there anything I can set in each virtual host to correctly set the
> envelope sender to a real address in their domain?
>
> I am getting sick of receiving all their bounces :(
>

if you have access you their scripts, you could try tweaking them.
you should be able to set the Reply-To address via the additional headers
field and if you're using sendmail you could try the -f flag:
<?php
mail("nobody@xxxxxxxxxxx", "the subject", $message,
     "From: webmaster@{$_SERVER['SERVER_NAME']}",
"-fwebmaster@{$_SERVER['SERVER_NAME']}");
?>http://www.php.net/manual/en/function.mail.phpandy



-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux