I have a web form which uses the following PHP code to send email:
$senderEmail = "sender@sender.com"
$senderName = "John Smith"
$noreplyEmail = "noreply@receiver.com"
$receiverEmail = "inbox@receiver.com"
$header = "MIME-Version: 1.0
Content-type: text/plain; charset=UTF-8
";
$header .= 'From: "' . $senderName . '" <' . $noreplyEmail . ">
";
$header .= 'Reply-To: "' . $senderName . '" <' . $senderEmail . ">";
$subject = "Contact form";
$message = "...";
mail($receiverEmail, $subject, $message, $header);
The problem is that although each time $senderName
, $senderEmail
and $message
are different in the inbox of the receiver (which is a Gmail domain inbox) the emails get stacked into a conversation by the Gmail's system.
What would be the proper way to prevent this stacking and receive them always as individual separate emails?