The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Change the name whi...
 
Share:
Notifications
Clear all

Change the name which emails are sent from

6 Posts
3 Users
0 Reactions
2,086 Views
Posts: 30
 adri
Topic starter
(@adri)
Trusted Member
Joined: 5 years ago

On email subscriptions the sent from is set to my "blog title".

How I can change the name which emails are sent from? What filter and php code do I add to my theme function?

I wanna for example,  "my name - Blog title"

Thanks!

 

 

 

Topic Tags
5 Replies
Asti
Posts: 7661
 Asti
Support
(@asti)
Illustrious Member
Joined: 7 years ago

Hi @adri,

Please try the solution provided in this post: 

https://wpdiscuz.com/community/postid/1073/

Reply
2 Replies
 adri
(@adri)
Joined: 5 years ago

Trusted Member
Posts: 30

@asti I saw that post, but that function is just changing the email address. I would like to put a name in front of the address so the message shows as coming from:

Name - no-reply@blogname.com
Reply
Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7661

ok @adri,

Then you need to use the wp_mail_from_name hook.

More info here: https://codex.wordpress.org/Plugin_API/Filter_Reference/wp_mail_from_name

Reply
Posts: 2
(@lucashere)
New Member
Joined: 5 years ago

Hi @Asti ,

I just tried adding

add_filter('wp_mail_from', function ($email){
return 'no-reply@blogname.com';
});

to my theme's function file, however, instead of changing the "reply-to" on the email message, it just does no add it anymore
Reply
1 Reply
(@lucashere)
Joined: 5 years ago

New Member
Posts: 2

Actually, I found out that it only stops working when I add the end of the extension of my domain, like this: contato@liradetamiris.com.br.

If I remove the ".br" it works.

Reply
Share: