1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Php Mail issue

Discussion in 'Plesk for Linux - 8.x and Older' started by dpalme, Mar 6, 2008.

  1. dpalme

    dpalme Guest

    0
     
    Plesk obviously has its own installation of php and the mail function is causing some problems. When it sends out an email....its sending it as anonymous@......

    How do I change the default FROM address it is coming from.....
     
  2. ljf4

    ljf4 Guest

    0
     
    From Anonymous

    I hope you receive an answer because I am having the exact same problem.
     
  3. ljf4

    ljf4 Guest

    0
     
    Fixed

    I used the solution found here:

    http://forum.swsoft.com/showthread.php?s=&threadid=45074

    putenv ("QMAILUSER=USER");
    putenv ("QMAILNAME=FULL_USER_NAME");
    putenv ("QMAILHOST=DOMAIN");
    $headers = "MIME-Version: 1.0\r\n";
    $headers .= "Content-type: text/plain;charset=us-ascii\r\n";
    $headers .= "From: FULL_USER_NAME <USER@DOMAIN>";
    $to="mail@domain.tld";
    $subject = "Testing email";
    $body = "";
    $err = mail($to, $subject, $body, $headers);

    However, another thread:

    http://forum.swsoft.com/showthread.php?t=50957

    recommend changing \r\n to \n in headers becuase of a bug in Plesk 8.x versions so I did that and now all my outgoing emails have the correct Reply To.
     
Loading...