Filter wp_mail based on content type

Note that the wp_mail filter runs before the wp_mail_content_type filter. If you’re using the PHP Mailer then you can try (untested): add_action( ‘phpmailer_init’, function( $phpmailer ) { if( ‘text/plain’ === $phpmailer->ContentType ) { $phpmailer->Body = ‘Filtered text here’; // <– Message override } });

wp_mail() not sending emails with ajax

And there is no way it will work this way… In your JS you fill your data like so: var data = { ‘action’:’send_confirmation_email’, ’email’:’confirm_email’, ‘key’:’confirm_key’, ‘name’:’display_name’, ‘id’:’user_id’, ‘is_email’:’true’ }; And later, in your AJAX callback in PHP you use it as follows: wp_mail( $_REQUEST[’email’], $subject, $message, $headers ); So you’re trying to send email … Read more

Send Mail with link to current_user

Gravity Forms will be your solution, but you will have to do some custom notifications. You will also need User Registration Add-On the https://www.gravityforms.com/add-ons/user-registration/ What you will need to do is: Create a hidden field called for example “current user email” and allow it to be populated automatically. Create a user registration feed and select … Read more

Simple filter to change label name of Email Adress to something else

add_action( ‘user_new_form’, ‘change_label_form’ ); function change_label_form() { echo ‘<script> jQuery(document).ready(function($) { $(“label[for=email]”).html(“Example”); } ); </script>’; } here is trick worked for me , you can change the label for any filed by using the for tag in the label and you can add action on any form you like, as add_action( ‘edit_user_profile_update’, ‘change_label_form’ ); Here … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)