Set mail sender for each website

Discussion in 'ISPConfig 3 Priority Support' started by aldo, Nov 18, 2013.

  1. aldo

    aldo Member HowtoForge Supporter

    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.
     
  2. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

  3. aldo

    aldo Member HowtoForge Supporter

  4. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    I said -f and not -F :)

    sendmail_from is for windows.
     
  5. aldo

    aldo Member HowtoForge Supporter

    Marius, you are right.
    -f works.
    Thanks!
     
  6. aldo

    aldo Member HowtoForge Supporter

    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");
     

Share This Page