Tag Info

New answers tagged

2

Instead of using wp_mail filter use action user_register: function fpw_new_user_post( $user_id ) { global $wpdb; update_user_meta( $user_id, $wpdb->base_prefix . 'capabilities', array( 'author' => TRUE ) ); $new_post = array ( 'post_title' => 'User ' . get_user_by( 'id', $user_id )->user_login . ' registered @ ' . date( ...


-8

Please try This. $to = 'user@wordpress.com'; $admin_email = 'admin@wordpress.com'; $subject = 'Please Confirm your email address'; $headers = "From: nillowpages \r\n"; $headers .= "Reply-To: ".$admin_email. "\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; $confirm_link ...


6

The following version of wp_mail() is with the patch applied of @rmccue/@MattyRob in the ticket https://core.trac.wordpress.org/ticket/15448, refreshed for 4.2.2, which allows $message to be an array containing content-type keyed alternates: /** * Send mail, similar to PHP's mail * * A true return value does not automatically mean that the user received ...


12

Using the PHPMailer class with an action callback: I did some digging into the PHPMailer class and found that it supports a custom action. Here's how the callback is activated with the doCallback() method in the class. There's also a PHPMailer test on GitHub using this feature via the callbackAction() callback. We can set it up in WordPress with: ...



Top 50 recent answers are included