Tag Info

Hot answers tagged

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: ...


5

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 ...


1

Please add following condition. $mailSent = get_user_meta($us_id, 'mail_sent', true); if($mailSent){ update_user_meta($us_id, 'mail_sent', 'mail sent'); }else{ $borrower_mail=wp_mail($to, $subject, $body); }


1

You can add your own logo to the message like this. Check "Use HTML content type" box in the Mail or Mail (2) section. Place <img src="{URL of the logo}" /> tag into the Message body textarea.


1

According to this page it would suffice to use this code (to disable all notifications completely): if ( !function_exists('wp_new_user_notification') ) { function wp_new_user_notification( ) {} } It's pretty close to the given answer, but a little shorter. I thought of sharing this for what it's worth.



Only top voted, non community-wiki answers of a minimum length are eligible