Php mail () function get spam email address

All my letters that I send on the local WAMP or on the server with the PHP mail () function always go to the SPAM folder.

When searching for a problem, I found that we should set the headers, for example, from id, reply to, return path, mime version, char type and charset .. I installed them all, but still the email goes SPAM to my Gmail / Yahoo ID any key?

All the email addresses I use from the / to / replyto / return path existing in real time, and yet it goes to SPAM, is very strange!

+4
source share
5 answers

Take a close look at the SMTP headers from messages that are marked as possible spam. Many spam filters will add a few lines listing the reasons the message was flagged; for example, if for some reason the IP address being sent is blacklisted, there may be a heading that describes which blacklists you have indicated.

+2
source

What I found locally was that sendmail_from was not installed in my WAMP, and as soon as I used it, ini_set ('sendmail_from', 'some_valid_email_address'); he gets into your inbox!

Wohaaa ... and also works live.

+3
source

This is one problem with the mail function. The best solution is to switch to any of them:

+2
source

It's one thing to make sure your HTML is validating. It turns out that spammers are generally unable to write HTML validation, and therefore this is a huge tip.

Another possibility is that you are using a shared host with another user who is a spammer. In this case, the entire IP range may be prohibited.

In addition, the use of reds in CSS and spam words (think "free", "viagra", "act now", "sale", etc.) are tips that use some spam filters.

The most important thing you can do to save your emails from spam folders is to send only email messages to people who request them . This will make people report spam to you. If many of your messages are sent as spam, your letters will be placed in spam folders.

+1
source

try not to include "From:", which might let the server think you're spoofing.

0
source

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


All Articles