如何通过PHP通知新帖子的订阅者?订阅者的电子邮件存储在Wordpress之外,假设它存储在另一台服务器上。
我找到了几篇这样的文章..。第一条
但它只向Wordpress的所有注册用户发送一封电子邮件。
发布于 2016-03-18 12:09:12
我认为,在这种情况下,您可能需要使用Wordpress save_post钩子,它是在保存了一个帖子之后触发的。您可以在这里阅读更多内容:帖子
所以,您可以在functions.php文件中做这样的事情
function on_create_send_email( $post_id ) {
// If this is just a revision, don't send the email.
if ( wp_is_post_revision( $post_id ) )
return;
//Handle your users and send the emails
}
add_action( 'save_post', 'on_create_send_email' );你选择如何处理大量的电子邮件将是个人喜好的问题。有一些插件可以帮助解决问题,或者你可以将它与Mailchimp之类的东西集成在一起。
https://stackoverflow.com/questions/36081477
复制相似问题