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

Postfix – how to retry delivery of mail in queue?

According to postqueue(1) you can simply run postqueue -f to flush your mail queue. If the mails aren’t delivered after flushing the queue but are being requeued instead, you might want to check your mail logs for errors. Taking a peek at postsuper(1) might also be helpful. Maybe the messages are on hold and need … Read more

How do I get apt-get to ignore some dependencies?

Simple and easy solution: just specify the unwanted packages with an extra – after each of them. Example without the – switch: root@debian:~# apt-get install bsd-mailx Reading package lists… Done Building dependency tree Reading state information… Done The following extra packages will be installed: exim4-base exim4-config exim4-daemon-light liblockfile-bin liblockfile1 […] Example using the switch to … Read more

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