• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

Php Mail issue

D

dpalme

Guest
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.....
 
From Anonymous

I hope you receive an answer because I am having the exact same problem.
 
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="[email protected]";
$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.
 
Back
Top