Custom Mail () and Spam Account

I create a mail client that uses a unique identifier to identify (duh) the conversation and thereby create a stream. This unique identifier is now bound to the subject line. Without an identifier in the subject line, mail becomes "lost."

Besides the fact that it closes the topic, it would be much more convenient if I could add the identifier to the custom header as follows:

$to = ' nobody@example.com '; $subject = 'the subject'; $message = 'hello'; $headers = 'From: Webmaster < webmaster@example.com >' . "\r\n" . 'Reply-To: webmaster@example.com ' . "\r\n" . 'X-myID: MghT3s' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); 

Is it possible? And will mail get a higher spam score by doing this?

// edit Responding to sending emails using a custom header, the header is not transmitted, so this is really not a solution.

// edit2 I am viewing the in-reply-to header. But I don’t know if it is used by all email clients.

+3
source share
2 answers

Yes, maybe not, you probably won’t get a higher spam score. Any heading beginning with "X-" is a legitimate extended heading. Many of these are related to spam filtering, email lists, etc.

Having an extended header is not prima facie proof that it is spam.

But are you sure you don’t want to use the In-Reply-To header or existing unique Message-IDs to create the stream?

+6
source

How can this header solve your problem if the user responds with his mail agent? In other words, the response will be sent without the X-myID .

A common way to track messages is to add a conversation ID to the subject or text, and tell users not to delete the source text of the mail or change the headers.

About beeing marked as SPAM due to headers - in fact I don't think so.

+1
source

Source: https://habr.com/ru/post/916245/


All Articles