• 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!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    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. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.

mail problem

D

dottor

Guest
php mail functions show anonymous@

I found this in knowledgeable

where do I do this

When using the php mail() function within a php script emails are sent out as "[email protected]". I would like the emails sent from a script to use the header information supplied in the mail() function.
Article ID : 1251
Last Review : Sep,12 2006
APPLIES TO:

* Plesk for Linux/Unix

RESOLUTION





To set the correct headers for the Return-Path you need to use the code like below:

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

In result mail will have FULL_USER_NAME<USER@DOMAIN> in Return-Path.
 
Back
Top