Any notification emails sent automatic is marked as spam and it's because contain via box4231.bluehost.com, Bluehost support tells me that this problem from wordpress.

How can solve ?



Wordpress by default use mail() function to send an email.

The problem is that the From-Email address is the VPS and it could be marked spam as many hosts are sending lots of emails per day. You can set up your own Email server but that is really difficult.

how to fix it?

Use the Check Email Plugin to check its email is working. If it is then they are going into spam rather than something worse. https://wordpress.org/plugins/check-email/

The easiest way to fix the spam problem is to use an SMTP plugin. These plugins use the SMTP protocol to send an email rather than the WordPress mail() function. You will need an email provider. Such as the email that comes with your web hosting account a provider like Gmail. You’ll also need to find your SMTP server details and username and password.

WP Mail SMTP is a no frills SMTP plugin. Just download it and activate. You’ll need to manually input your SMTP details. https://wordpress.org/plugins/wp-mail-smtp/

Easy WP SMTP is the advanced plugin. It works with Gmail, Hotmail, and Yahoo. Set up instructs are available on the website. https://wordpress.org/plugins/easy-wp-smtp/

Postman SMTP is best. It has an easy to use setup wizard if you aren’t great with technical things. It can be set up with Mandrill, Sendgrid, and Gmail as well as others. https://wordpress.org/plugins/postman-smtp

PHP code

It also works. I found this before in StackOverflow searching by google. In many of my projects, I used this.

//put in functions.php or custom plugins

// changed return value.

add_filter( 'wp_mail_from', 'my_mail_from' );
function my_mail_from( $email ) {
    return "enter your 'from' id";

add_filter('wp_mail_from_name', 'new_mail_from_name');
function new_mail_from_name($old) {
    return 'enter your "from name"';
wp_mail( $admin_mail, $subject, $message );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.