Notifications
Clear all

[Solved] How to set email sender for registration only for Forum not the blog or store using Code Snipet

3 Posts
2 Users
1 Likes
1,116 Views
Posts: 92
Topic starter
(@ldj72)
Estimable Member
Joined: 1 year ago

Hi,

I found your very interesting information about changing Name and email address , in your documentation, using Code Snippet.

add_filter( 'wp_mail_from', function( $name ) {return 'noreply@mydomain.com'; } );
add_filter( 'wp_mail_from_name', function( $name ) {return 'My Forum Name'; } );

On the same website, I have :

A store: mystore.com with the name "The store"

A Blog: mystore.com/blog with the name "The Blog"

A forum: mystore.com/community with the name "The forum"

 

How do I set "The Forum" as the name for the "User Registration and Password Reset Emails" sender but ONLY for forum subscribers and not for "Store" customers and "Blog" readers?

 

Thanks for your support

 

 

wpForo Version
2.09
WordPress Version
6.1
Topic Tags
2 Replies
Posts: 3652
Admin
(@chris)
Support Team
Joined: 2 years ago

@ldj72,

wpForo doesn't have option to set the email sender name by User Roles. It better to set the Website Name as email sender.

Posts: 92
Topic starter
(@ldj72)
Estimable Member
Joined: 1 year ago

Ok, thank you.