Sending bulk mail to a certain number of users

We would like to send bulk mail to the user list using wp_mail() function.Is it possible to send e-mail to users at a ce

We would like to send bulk mail to the user list using wp_mail() function.

Is it possible to send e-mail to users at a certain time (similar to newsletter plugins)? For example, dividing the list of 100 users into 10 groups of 10 people each. Is it possible to send mail to 10 groups with 5 minute intervals?

To give an example instead of theoretical:

We would like to automatically email users who have added "Technology" category to their favorites whenever they post a new post in this category.

How can we edit a function like this to do this?

add_action( 'transition_post_status', 'new_post_notice', 10, 3 );
function new_post_notice( $ID, $post ) {

    if ( 'publish' === $new_status && 'publish' !== $old_status ) {

        $to = //All users who have added "technology" categories to their favorites
        $subject = 'A new post has been published!';
        $message = 'E-mail body.';

        wp_mail( $to, $subject, $message, $headers );

    }
}

Can the sleep() function be used to do this?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744880040a4598784.html

相关推荐

  • Sending bulk mail to a certain number of users

    We would like to send bulk mail to the user list using wp_mail() function.Is it possible to send e-mail to users at a ce

    1天前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信