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 Reactions
1,227 Views
ldj72
Posts: 95
Topic starter
(@ldj72)
Estimable Member
Joined: 2 years 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

 

 

Topic Tags
2 Replies
Chris
Posts: 3649
(@chris)
Famed Member
Joined: 3 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.

ldj72
Posts: 95
Topic starter
(@ldj72)
Estimable Member
Joined: 2 years ago

Ok, thank you.