• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

change email sender mail

F

fredalva

Guest
Hi , i use php mail to send automatique mail to my customer but the post mail they received is style by [email protected]

How can i change this?
thanks

excuse my english,i am french
 
The PHP mail() function uses this format:

mail( $to, $subject, $message, $from);

Your return email address is equal to $email
The address you are sending to is equal to $to

build your list in this format:

$subject = "Subject of email\r\n";
$message = "Message body\r\n";
$from= "From: $email\r\n";
$from .= $Reply-To: $email\r\n";
mail( $to, $subject, $message, $from);

Hope this helps
 
Back
Top