WordPress Emails & Contact Forms [closed]

Your could debug php mailer in WP using franz’s wpmail_exceptions plugin https://gist.github.com/franz-josef-kaiser/5840282 Place the first file in /wp-content/mu-plugins/ and make sure you’ve set WP_DEBUG to true. You should test while logged in as administrator. Errors will be printed in main buffer so make sure to inspect any xhr requests if your form works asynchronously (Ajax). … Read more

Pass return-path additional parameter in wp_mail

Yes! There’s a plugin that does this, and it’s very simple. It uses the phpmailer_init to adjust the $phpmailer object. This is the code it uses: if ( ! function_exists( ‘wp_mail_returnpath_phpmailer_init’ ) ) { function wp_mail_returnpath_phpmailer_init( $phpmailer ) { // Set the Sender (return-path) if it is not already set if ( filter_var( $params->Sender, FILTER_VALIDATE_EMAIL … Read more

Where does email sent to *@example.com go? [closed]

If you attempt to send an email to *@example.com Your SMTP will check the domain exists. Your SMTP server will lookup for a MX record at example.com. There is none: Your SMTP will fall back on the A record. The IP is 174.137.125.92 (as of today) The IANA has registered the domain, but has not … Read more

Sent comments notifications to multiple users

Something like this should work: add_filter(‘comment_notification_recipients’, ‘override_comment_notice_repicient’, 10, 2); function override_comment_notice_repicient($emails, $comment_id) { $admins = get_users( array( ‘role__in’ => array(‘administrator’), ) ); foreach ( $admins as $user ) { $emails[] = $user->user_email; } return ($emails); }

Get user custom field value on function.php

EDIT I think the solution given by @dboris may work. Alternatively you could try to hook your email sending after the user registration like this global $uID; //to keep the value to reuse it later, null at this step function mailInscriptionSecteurRhone() { global $uID; $user_ID = $uID; $headers = array(‘Content-Type: text/html; charset=UTF-8’); $candidat = get_userdata( … Read more