What you need to do is to modify the code that sends the email to the author and in it set the “reply-to” header of the email, pass it as part of the headers parameters to wp-mail
.
Your code should be something like (adapted from the php mail function documentation).
$to = '[email protected]';
$subject="new comment";
$message="hello";
$headers="From: [email protected]" . "\r\n" .
'Reply-To: [email protected]';
wp_mail($to, $subject, $message, $headers);
Of course you will need to get the relevant email addresses from the post author and the comment author fields, and you will probably want to specify the “nice names” of all the people involved with the actual email address
Related Posts:
- Is there a way to embed an iframe in an email with text that updates?
- Sending multipart (text/html) emails via wp_mail() will likely get your domain banned
- changing notification emails from WordPress @mydomain.net to something else
- Disable user registration password email
- Alert Email when any Post or Page is Changed
- “Reply-to Address” Email
- prevent users from changing their email address
- Disable new user notification to admin email
- Include HTML template file in wp_mail
- Email sent from WordPress has HTML tags
- How to disable automated E-Mail on PHP error/exception?
- Email stats at Ma.tt contact form
- Send mail to wordpress admin
- wp_mail recipient array not sending?
- Transferring contact form input to an email account without using an email-proxy
- Contact Form 7 + Configure SMTP: Sender email appearing as my own email [closed]
- Handle registrations in WordPress when user doesn’t have any email?
- Disable WP notifications for commenting on own posts
- Must I change the admin user email address while changing the general email address?
- Batch Emails with wp_mail()
- Subscribe from another website to the same list [closed]
- Obfuscating Email Addresses in Form Fields
- Email ‘from address’ has a www in it
- Is there no way to send email using SMTP without plugin or custom coding?
- Send email daily from WordPress site
- Mechanism to send to users of secured WordPress install new notifications by SMS or email?
- How to change the Customer new account email
- Is it possible to change an existing post status from ‘pending’ to ‘publish’ via email?
- WP mail sent to MS Exchange recipients = occasional email corruption?
- What can be wrong when automated backups stop being sent to email?
- Wp_new_user_notification doesn’t work
- Make WordPress use timezone for email Date header
- How to send mail from WordPress if one server hosts page and another email?
- Disable email confirmation new register bbPress [closed]
- Not able to send links in email after setting header
- Stop the execution of foreach loop which extract data from array?
- wp_mail_from is ignored
- How to receive an email with WordPress?
- How to edit the WordPress e-mail that gives the user their password? [duplicate]
- What is the best way to send out thousands of emails from a WordPress site? [closed]
- Do action for only switch status for publish_post
- Generate Email if No Posts Within Time Period
- Interrupted cron script sending me hourly emails. Please help!
- Content of post does not end up in “ShareThis” mail
- Programming WordPress to Send an Email on Registration Form Submit?
- Does WordPress require port 25 for email?
- How to differentiate between email subscription list and blog subscription list?
- Is there a plugin that will let you do actions by mail? [closed]
- What emails does wordpress send?
- Requiring wp-login.php sends headers automatically
- How to stop WordPress from sending mails?
- Changing email “From” address
- Changed my email. Locked out
- Add “Email Image” button with Hyperlink for individual images [closed]
- Send confirmation email when a user’s role is upgraded
- WordPress site member verification emails going to spam on Outlook
- Block to accept and send email to specific domains
- I want to setup a button/popup/whatever that will prompt users on the site to input their email address
- Sending a password reset link
- How to prevent sending auto emails for specific actions in wordpress
- Receive no any emails from contact from 7 wordpress
- Need to suspend RSS feed while repairing missing old post
- User Without Email?
- WordPress new user email formatting issues
- email saying that was not possible to send the email
- WordPress emails are not delivered if the recipient email address has a non-traditional domain extension
- could not call wp_email function twice
- Is it possible to use different from email in contact form 7 with different domain?
- Activation email to change admin address not being sent to Gsuite email account
- Send email with Content-Type text/plain
- Email post to submitter
- How can I remove the product short description from the WooCommerce Mails?
- Email verification at a later date?
- How to integerate WordPress Mail SMTP plugin to Report and Request custom page
- Contact Form 7 How to Alter the From email address?
- wp_mail() not sending emails with ajax
- changing notification emails from WordPress @mydomain.net to something else
- Emails sent from local wp webserver are beeing rejected from Siren?
- Check if “Send the new user an email about their account” is ticked
- email explanation for newbies
- WordPress stops executing code after the require() method
- User Registration – no Email required
- Email Piping using google apps within WP Engine
- Download Free Trial After Email Entered
- Duplicate notifications for new user registration
- Email notification
- Custom notification for contributors when posts are scheduled
- User profile update author
- Allowing Loading/Downloading of .mp3
- Contact Form 7 – E-mail message template [closed]
- What is the correct way to send multipart email in wordpress?
- Welcome Email Going to Spam
- What’s the simplest way to send WordPress posts to a Mailchimp list? [closed]
- Having Issue on Receiving Emails From @Gmail.com or @Yahoo. in WordPress Using PHP Mail Function
- Fighting Spam – What can I do as an: Email Administrator, Domain Owner, or User?
- Where does email sent to *@example.com go? [closed]
- How to add verification on email address change?
- How to change the WordPress email icon?
- Is there a wordpress function restrict public email id for registration like as is_email()
- What’s the optimum way to collect users’ email id?