WordPress notification emails going to spam

How can I prevent Worpress notification e-mails from going to recipients’ spam folders?

I have set up a site along with its blog in three different environments as follows (I’m using “mydomain.com” instead of the actual site’s domain for confidentiality reasons).

Read More
  1. local.mydomain.com and blog.local.mydomain.com on my machine
  2. dev.mydomain.com and blog.dev.mydomain.com on my dev server
  3. mydomain.com and blog.mydomain.com on production server

When I create users in 1 and 2 (local and dev), notification e-mails go to the inboxes of the newly created users. But when I do the same in production, they go straight to the spam folders.

Now, by default WordPress notifications are sent from wordpress@yourblogsdomain.com, so in my case, these were sent by wordpress@blog.mydomain.com, wordpress@blog.dev.mydomain.com and wordpress@blog.local.mydomain.com. So I installed the Mail From Plugin to change the default address, and now all three servers are sending the messages from hello@mydomain.com, which is an existing and working address.

mydomain.com e-mails are managed by Google Accounts, that’s working fine, ie, messages sent from @mydomain.com accounts are received as not-spam messages. That’s including that hello@mydomain.com address.

All this leaves me thinking there might be something wrong with the server that’s hosting my production site, but I have no idea where to start looking.

Thoughts?

Related posts

Leave a Reply

2 comments

  1. I usually handle this on the server level by ensuring all emails sent by wordpress are sent via my own SMTP server. You can do this a couple ways. My preference is to configure all mail being sent from my server to use SMTP. I usually use an Ubuntu server – here is a link to using PostFix SMTP https://help.ubuntu.com/community/Postfix. Another way would be to use one of the SMTP plugins and configure to use your email server.I have used this one in the past – http://wordpress.org/extend/plugins/wp-mail-smtp/screenshots/.

  2. Its work definitely

    Please use this code its help you:-

    add_filter( 'wp_mail_from', 'my_mail_from' );
                    function my_mail_from( $email ) {
                        return "enter yout '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 );