Hey @rockstaremperor,
By default, any email sent from WordPress has the default “WordPress” name. You can use 3rd party plugins like https://ww.wp.xz.cn/plugins/wp-change-email-sender/ to change it.
Hi Harish,
Earlier, I was using Fluent Forms plugins for the contact form. Whenever I receive emails, sender field would display the sender’s name instead of WordPress. So is it possible to do the same in your plugin without using additional 3rd party plugin?
Hi,
You can add the following code snippet:
add_filter(‘hf_action_email_from’, function($to, $submission) {
return “[email protected]”;
}, 10, 2);`
Hope that helps. If you have any questions, please let me know!
Hi Lap,
I think that code is not related to my query. I just wanted Sender’s Name to display in From field instead of “WordPress” which is displaying now for every email I receive.
For example, this is what I am receiving now.
From: WordPress <sender’s email>
I wanted like this.
From: Sender’s Name <sender’s email>
Can you please test
add_filter(‘hf_action_email_from’, function($to, $submission) {
return “Your name <[email protected]>”;
}, 10, 2);`
Hope that helps. If you have any questions, please let me know!
Sorry, not my name or my email. You did not get it. I am the receiver. I want sender’s name and sender’s email to display in “From” field.
I would not do that as it will most likely mark all the emails as spam as your server doesn’t have permission to send emails coming from those domains.
Instead, under HTML Forms > Form > Actions > Email, under Additional headers fill:
Reply-To: [NAME] <[EMAIL]>
That will keep the from as is, but it will set the reply to to the values filled in the form.
Hope that helps. If you have any questions, please let me know!
I just filled the From field as
From: [NAME] <[EMAIL]>
Problem solved. Thanks!