Limit number of emails per second

A possible workaround depending on your level of coding knowledge: You could use the Transients API. Simplified: It adds an Option with an expiration time. Then you could hook into the phpmailer_init-action and update the transient value with your new email. If the time expired, you could send the previously added mails out and then … Read more

Email entire post contents

You can have a look on the following plugin for this purpose: http://wordpress.org/extend/plugins/wp-email/ For this plugin to work, your localhost WordPress web server need to connect your SMTP server for sending email. Follow the instruction on the link below to install the plugin: http://wordpress.org/extend/plugins/wp-email/installation/ Cheers.

How can I send an email in my plugin?

Use wp_mail(), not just mail(). It is a wrapper for PHPMailer, a class that takes care for many problems the native mail() function often gets. See my plugin 404 Tools for how to use it in this case. To send an HTML email see Milo’s answer to a related question.

Same email for all comments

Just change to to address for these emails. Sample code, not tested: // hook in late, to avoid side effects. add_filter( ‘comment_notification_headers’, ‘wpse_73855__change_comment_notify_to’ ); function wpse_73855__change_comment_notify_to( $input ) { if ( ‘comment_notification_headers’ === current_filter() ) { add_filter( ‘wp_mail’, __FUNCTION__ ); return $input; } $input[‘to’] = get_option( ‘admin_email’ ); remove_filter( current_filter(), __FUNCTION__ ); return $input; }

Receive each week the number of posts published

Here is a basic use for WP_Query that returns an object containing all posts for the current week as $query. The last line echos the property `found_posts’, which provides the count for the week query. $args = array( ‘date_query’ => array( array( ‘year’ => date( ‘Y’ ), ‘week’ => date( ‘W’ ), ), ), ); … Read more

WordPress Registration Email by Role

Scroll down a little bit, most of it is WordPress default code but you must add everything to your plugin or you might break it! I’ve also added few useful snippets below. Copy-paste them to same plugin. <?php /* * Plugin Name: Emails * Plugin URI: http://www.your-site.com * Description: Different registration email for different roles … Read more