I have a SMTP question. I created a PHP script to send emails. The requirement is that I need to send an email with " email1@example.com ", but I need answers to go to " email2@example.com "
I added email2@example.com in the reply-to header field. The only problem that I encountered is that when someone receives an email and presses the reply button, the tags email1@example.com and email2@example.com displayed in << 24>.
Is there a way to remove email1@example.com from the TO field and show only the email address specified in the reply-to field?
I am using PHPMailer, and the code below:
$this->phpmailer->IsSMTP(); $this->phpmailer->Host = $server; $this->phpmailer->Port = $port; $this->phpmailer->SetFrom($fromEmail, $fromName); //this is email1@example.com $this->phpmailer->AddReplyTo($replyEmail,$fromName); //this is email2@example.com $this->phpmailer->Subject = $subject; $this->phpmailer->AltBody = $msgTXT; // non-html text $this->phpmailer->MsgHTML($msgHTML); // html body-text $this->phpmailer->AddAddress($email);
source share