Article ID: 1251, created on Oct 6, 2008, last review on May 2, 2016

  • Applies to:
  • Plesk 8.x for Linux/Unix


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

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

As a result, mail will have "FULL_USER_NAME<USER@DOMAIN>" in the Return-Path.

b8ef5052d936e902043e41759118114e a914db3fdc7a53ddcfd1b2db8f5a1b9c 29d1e90fd304f01e6420fbe60f66f838 56797cefb1efc9130f7c48a7d1db0f0c

Email subscription for changes to this article
Save as PDF