Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
25 Million+
Websites using our plugins
Years of WordPress experience
WordPress tutorials
by experts

How to Email Authors When Articles Are Published in WordPress

Editorial Note: We earn a commission from partner links on WPBeginner. Commissions do not affect our editors' opinions or evaluations. Learn more about Editorial Process.

Do you want to email authors when their articles are published in WordPress?

If you run a multi-author blog, then notifying authors when their blog posts are published keeps them informed. Plus, it can increase engagement on your website since authors can quickly share their content and participate in discussions.

In this article, we will show you how to email authors when their articles are published in WordPress.

Email authors when their articles are published in WordPress

Why Email Authors When Their Articles Are Published in WordPress?

By notifying authors when their posts are published on your WordPress blog, you allow them to immediately promote their work on social media platforms and communicate with readers in the comments section.

Additionally, notifications keep authors updated about the publication statuses for different posts. This helps build trust among your team by showing that you value the writer’s contributions to your multi-author blog.

By alerting authors immediately upon post publication, you also give them the opportunity to view their content and correct any typos or errors before visitors have a chance to read it.

Having said that, let’s see how to easily email authors when their articles are published in WordPress. You can use the links below to jump to the method of your choice:

Method 1: Email Authors When Their Article Is Published in WordPress Using a Plugin

If you prefer to use a plugin to notify authors when their WordPress posts are published, then this method is for you.

First, you need to install and activate the PublishPress Planner plugin. For detailed instructions, see our beginner’s guide on how to install a WordPress plugin.

Note: You can also use the PublishPress Pro plan to unlock more features like Slack integration, send reminder notifications, and meta posts. This will help you improve the overall editorial workflow of your multi-author blog.

Upon activation, visit the Planner » Settings page from the WordPress admin sidebar and switch to the ‘Notifications’ tab.

Once you are there, type in the admin email address that will be used to send emails to your authors next to the ‘Email from’ option.

After that, check the ‘Always notify the author of the content’ option to send emails to authors every time their posts are published on your website.

Check the always notify author option

If you also want to notify the WordPress users who edited the post, check the ‘Always notify users who have edited the content’ option.

Once you are done, click the ‘Save Changes’ button to store your changes.

Now, when you publish an author’s article, they will receive a post notification on their email that looks like this:

Preview of author email notification upon post publication

Method 2: Email Authors When Their Article Is Published in WordPress Using Code

If you don’t want to use a plugin, then you can also automatically send emails to the author of the post by adding code to your theme’s functions.php file.

However, the smallest error when adding code can break your website and make it inaccessible.

That is why we recommend always using WPCode. It is the best WordPress code snippets plugin on the market that makes it super safe and easy to add custom code to your website.

First, you need to install and activate the WPCode plugin. For details, you can see our step-by-step guide on how to install a WordPress plugin.

Note: You can also use WPCode’s free plan for this tutorial. However, upgrading to the pro version will give you access to more features like a code snippets library, conditional logic, and more.

Upon activation, visit the Code Snippets » + Add Snippet page from the WordPress dashboard.

Then, click the ‘Use Snippet’ button under the ‘Add Your Custom Code (New Snippet)’ option.

Add new snippet

This will take you to the ‘Create Custom Snippet’ page, where you can start by adding a title for the code snippet.

After that, select the ‘PHP Snippet’ option from the Code Type dropdown menu on the right.

Choose the PHP Snippet option for emailing authors upon post publication

Now copy and paste the following custom code into the ‘Code Preview’ box:

function notifyauthor($post_id) {
$post = get_post($post_id);
$author = get_userdata($post->post_author);
$subject = "Post Published: ".$post->post_title."";
$message = "
      Hi ".$author->display_name.",
      Your post, \"".$post->post_title."\" has just been published.
      View post: ".get_permalink( $post_id )."
   wp_mail($author->user_email, $subject, $message);
add_action('publish_post', 'notifyauthor');

This code runs when a new post is published in WordPress. It sends an email notification to the author using the subject and message defined in the code. Feel free to change the subject and message fields to meet your needs.

Once you have done that, scroll down to the ‘Insertion’ section and choose the ‘Auto Insert’ mode. Upon activation, the code will be automatically executed on your website.

Choose an insertion method

Finally, scroll back to the top and toggle the ‘Inactive’ switch to ‘Active’.

After that, click the ‘Save Snippet’ button to store your settings.

Save the snippet for emailing authors upon post publication

Now, when you publish a post on your WordPress website, the author will automatically receive an email notification.

It will look like this:

Preview for sending email notification to authors upon post publication

Bonus: Use WP Mail SMTP to Send Your Emails

When you send emails to your authors about their published posts, you are using the default WordPress email settings, which are not always reliable.

This means that your email may not reach the author or might even end up in their spam folder.

To fix this issue, you can use WP Mail SMTP, which is the best WordPress SMTP plugin on the market.

WP Mail SMTP website

It uses the SMTP (Simple Mail Transfer Protocol) method for mail transmission and eliminates your email delivery problems.

You can easily connect WP Mail SMTP with popular email marketing services and make sure that your emails reach the user’s inbox immediately.

You can also avoid the spam folder, track your email logs, use backup connections and failure alerts, and use premade templates to send emails to your users.

For detailed instructions, see our beginner’s guide on how to properly configure your WordPress email settings.

We hope this article helped you learn how to email authors when their articles are published in WordPress. You may also want to see our tutorial on how to highlight author comments in WordPress and our expert picks for the best free author bio box plugins for your WordPress site.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

11 CommentsLeave a Reply

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Mrteesurez says

    Yes, I run a multi-author blog and I need this. I used to manually notify them through calls or chat to inform them of their post status but this article will be useful to solve this issue and this will even increase authors value. thanks.

  3. Jiří Vaněk says

    Engaging the author immediately after their post is published is a great way to non-violently get them to interact much faster and better with the readers of their post. Thanks to this, he can practically immediately monitor, for example, the comments under the article, and he can also, from the position of the author, immediately specify questions that may be of interest to his readers. At the same time, it keeps the article writers in better touch with the audience, so it’s a win-win.

  4. Konrad says

    Notifying authors about published articles is a win-win. Enhances engagement, promotes immediate sharing, and fosters a sense of trust within the blogging team.

  5. Moinuddin Waheed says

    Notifying authors of their content getting published will act like giving a feedback loop and a motivation to engage with the content and share to reach more audience.
    I used to use the same way to notify my news blog authors of their content getting published and it helped reach more engagement with the content.

  6. Efma says

    Any help as to how will I go about notifying the author of a post when a post status has been changed back to draft?

  7. Yoav says

    i’m using Method 3 (adding code to function.php) and it worked fine for some time . but now it’s sends 4 email to the author instead of 1. do you have any idea what went wrong?
    Thanks a lot

  8. Augusto says

    Hi, first of all thank you for your great article and sorry for my bad english… I am italian.

    Well, I need a suggest…. but my scenario is different, anyway this is the situation:

    1) I manage a multi authors site.
    2) They can publish without any control (they are all journalists, so the authors can publish in “real time”)
    3) My authors ask me to add a little form under their post (like the classic mailing list form)
    4) The purpose of this form is to send and email to the subscribers only when the author of the post publish a new post.

    In a few words. The author John write a post. The visitor Adam fill in the form (under the post) with his name and email, and from this moment, every time John will write a new post wp will notify the event to Adam and to all the others John’s subscribers.

    The question: there is on the market a plugin like this?
    A big thanks!!


Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.