3

I can not solve the problem of spam. I only have 7.6 / 10 on Mail-Tester.com.

I specify that I use postfix, and I need it only for the sendings.

Here is my result: https://www.mail-tester.com/web-n0z33

Mail-Tester.com tells me that the problem come from ReplyTO… But I am obliged well to use ReplyTO so that I can click "to answer" when I receives an e-mail sent since a form of contact of my Web site.

I also specify that FROM I put an email address @my-domain.fr. Because if in FROM I directly put the email address of the visitor who fills my contact form I have even worse errors with Mail-Tester.com.

And here is my PHP code:

$mailer = new Mailer();
$mailer->setFrom(contact@mondomaine.fr)
    ->setReplyTo('emailexemple@gmail.com')
    ->setTo($_GET['mail'])
    ->setSubject($data['subject'])
    ->setBody('front/specific-page/contact/contact-html', $data)
    ->addBodyText('front/specific-page/contact/contact-text', $data);

var_dump($mailer->send());

I use SwiftMailer with the driver at 'mail', but I created my own adapter so that's why I have this code. But it is easy to understand.

How to solve my problem? How to have a 10/10 rating with Mail-Tester.com?

Thank you very much.

stephweb
  • 97
  • 11

2 Answers2

0

I am sitting with the same problem. Currently, from what I have found on the net, you can not "fix" this. However, there are some ways to help resolve it. Here are a few options you can try, based on these references:

They both say the following:

"Wrap mail messages in HTML tags to avoid spam filters."

Granwille
  • 149
  • 6
-2

The FROM address must be those from the visitor who uses the contact form. How would you else respond to the email? And why even use a tool to test the spam score of an email sent with a contact form? You are the only receiver of those emails.

The 10/10 rating with Mail-Tester.com is telling you only, that Mail-Tester thinks, that your email is just fine. I would not rely too much on this tool. All email service providers have anyway own spam filters and will handle your email as they see right. For instance, if you test your email with another tool like https://www.emailchecky.com, you will mostly see other results and found errors.

Or make another test:

You can send the email also to a Gmail address and see if the email is landing in the main inbox or the spam folder instead. Gmail has the most aggressive spam filters and rules I know. If your email will pass these rules and filters you can be proud of your email.

  • This is a wrong answer! The FROM must be from the sender. if a server C is sending an email to A but originationg from B it MUST NOT use FROM B but FROM C! Otherwise it is a forged sender! – Alexander Dobernig Apr 15 '21 at 10:20