Skip to content

How to change the me when receiving email on contact us

I’ve created an contact us form using PHP Mailer, however the problem is when I received the email the name before you open it is me and I can’t figured out how to fix it. Also I appreciate it if someone explain to me what is the different between Username and the add Address. Thank you in advance.

Here is the me I’m referring to

use PHPMailer;

if(isset($_POST['name']) && isset($_POST['email'])){
$name = $_POST['name'];
$email = $_POST['email'];
$subject = $_POST['subject'];
$body = $_POST['body'];

require_once "PHPMailer/PHPMailer.php";
require_once "PHPMailer/SMTP.php";
require_once "PHPMailer/Exception.php";

$mail = new PHPMailer();

//smtp settings
$mail->Host = "";
$mail->SMTPAuth = true;
$mail->Username = "";
$mail->Password = '';
$mail->Port = 465;
$mail->SMTPSecure = "ssl";
$mail->SetFrom("$email ", "$name");

//email settings
$mail->setFrom($_POST['email'], $_POST['email']);
$mail->Subject = ("$email ($subject)");
$mail->Body = $body;

    $status = "success";
    $response = "Email is sent!";
    $status = "failed";
    $response = "Something is wrong: <br>" . $mail->ErrorInfo;

exit(json_encode(array("status" => $status, "response" => $response)));



You are sending mail from the same email address to the same email address.

So, many email clients identify yourself as me.

You will have to send using another email address, and you will be idenfied with your email/name.

As Jesse said: You can also send mail to another email, and it will usually not show me.