You can filter the $phpmailer
object. Something like this should do the trick (not tested):
add_action( 'phpmailer_init', 'wpse_52555_msg_id' );
function wpse_52555_msg_id( &$phpmailer )
{
$msg_id = get_post_meta( get_the_ID(), 'messageID', TRUE );
'' !== $msg_id and $phpmailer->MessageID = $msg_id . '@test.com';
}
Related Posts:
- WordPress refuses to send mail, “…your host may have disabled the mail() function”
- Should I use wp_mail or PHP’s mail? [duplicate]
- Mail not sent when I set HTML headers
- Processing a subscription form with POST method?
- Different Webhost and using Google Mail server: Is there a better way than SMTP?
- PHP 8, AJAX mail form to function.php doesn’t work
- How to retrieve the sender email with wp_mail()?
- Pass return-path additional parameter in wp_mail
- Wp_mail doesnt work
- get_post_meta is always empty when I use wp_mail
- How can I send an email using PHP?
- WordPress “phpmailer_init” not working for me
- WordPress new user / forgot password emails are broken
- wp_mail function timing out
- How to disable wordpress confirmation email for new users
- Why is my get_post_meta always empty
- Best way to create a user programatically
- Error when requesting password reset email – wp authentication
- Send PDF link in email based on radio button selection
- Woocommerce HTML email option unavailable
- Trigger Woocommerce New User Email
- wp_mail not sending
- Validate emails in array using foreach
- Attaching a pdf to Contact Form 7 e-mail via functions.php [closed]
- Setting up 2 SMTP accounts: 1 for wordpress and 1 for woocommerce
- Set a condition based on WooCommerce checkout city field while placing order
- Redirect to another page after submission using wp_mail
- WooCommerce – Email admin with new user details
- How do you ensure that a user is recognised and available for use only when it is verified through a row in the database called ‘accountVerified’?
- Capture User Email Address When Filling Out Form
- Send multiple attachments with wp_mail in PHP
- wp_mail file attachment not being placed in upload folder?
- Website needs to be opened for wp_mail to work
- Auto 301 to full post permalink? (using : /archive/%post_id% to %post_name% )
- Can I get an email notification when media is uploaded to the media library?
- Notify users only on post publish
- Sending a custom form data in email through WP Mail Function
- Woocommerce Email attachments not working – file not being attached
- Pass Variables or Variable Place-Holder from Editor to PHP
- Get user custom field value on function.php
- Send notification email to admin for every new post published
- difference between sanitize_email ,FILTER_VALIDATE_EMAIL and input email type in html5
- Different SMTP based on domain
- Use of antispambot with $curauth->email
- How do I attach an invoice PDF to an email in the Dukapress plugin for WordPress?
- Contact form – problem with displaying message about sent mail
- Get page permalink in contact form
- How to setup the Email piping in WordPress plugin?
- Is it secure to use SMTP password in .php file in WordPress website?
- Send an e-mail on address with the link with disliked post
- comment_post (if comment is approved OR $comment_approved === 1) not working?
- Running SMTP Conditionally
- I want to fusion the product columns in email table order
- Woocommerce checkout page – custom field checkbox value into email
- Including user data in “new user notification email”
- Cron not sending wp-mail()
- Email always ends up in spam
- Premature end of script headers: wp-mail.php?
- Changing default WPMU emails to be send thorugh Campaign Monitor Transactional emails
- Send email to users when they get new followers
- Adding action item to admin users table and sending email
- How can disable wordpress emails notifications?
- Woocommerce custom field on emails outputs ‘Array’
- Using Custom Javascript and pHp to send email to myself when a user clicks on an input button but only works on Chrome, IE, and Micorosft Edge
- Trying send mail from Theme page
- Cron job to call php to email last 24 hours posts
- How to check “From Email” via WordPress before an email is sent
- Adding multiple emails to a
- How to show value from ACF plugin field in e-mail?
- How can I prevent wordpress from sending emails
- wp_mail vs mail functions and header arrays
- Dynamic Email Handler with ‘header (“Location: …’
- Customize the summary table of an order in the email
- Why does WordPress not send the user the email to add a password?
- Word press – JSPDF – Sending PDF as attachment from wp_mail – Special characters
- Why is my custom email notification after purchase not sending?
- Reposition WooCommerce breadcrumb outside of wrapper content
- Add before_content and after_content to register_sidebar
- Use custom post type for a store locator
- How to change menu order item
- Hide a div to subscribers(user role) in one page (is_page)
- CSS change in woo commerce Place Order Text [closed]
- Known Issues in WordPress When Upgrading PHP to ver 7
- Call to a member function get_row() on a non-object, Unable to use global $wbdp inside a plugin
- How can I restrict access to a widget to admins only?
- Why would the child theme load in the Customize preview, but not on the site itself?
- Sending simple variable on single page to WP JSON
- Hide a div if the fiels is empty
- How to display acf field values from home page on all pages?
- How can i show specific Category List?
- I got big white screen when i attach main style sheet of Html in functions.php
- Change headers for one custom PHP file
- How can i send id of the currently posted form data through json response in custom wordpress plugin?
- Inline Styling a div from a Custom Metabox
- WordPress rating by views [closed]
- 403 (Forbidden) delete file image in themer folder
- Dynamic Gallery
- A better way to write this php function
- Generate and upload screenshot as featured image for user-submitted post
- How can precision be improved for the debug log timestamp?