Example:
email 1 has email to reply to as `test@testing.co.uk`
email 2 has email to reply to as `support@testing.co.uk`
My current code:
if($this->teacherEmail && $this->teacher_reply_enable)
$this->mail->AddReplyTo($this->teacherEmail, $this->schoolTitle);
else
$this->mail->AddReplyTo($this->schoolEmail, $this->schoolTitle);
$this->mail->Subject = $this->subject;
$this->mail->msgHTML($this->getMessage());
$this->mail->AltBody = strip_tags($this->message);
$this->mail->addAddress($this->to, $this->to_name);
foreach($this->attachments as $item){
$email_attachment = DOC_ROOT.$item->path.$item->orig;
$email_attachment_title = $item->name;
$this->mail->addAttachment($email_attachment,$email_attachment_title);
}
if (!$this->mail->send()) {
return false;
} else {
return true;
}
The problem i'm having is that email 1 has been sent successfully the reply-to:
is test@testing.co.uk, then email 2 is sent and the reply-to:
is both test@testing.co.uk
and support@testing.co.uk
.
I want it to reset the reply-to:
for each email sent so that it doesn't have the issue of having two reply-to:
's