PWaddict Posted April 21, 2021 Share Posted April 21, 2021 Hi! How to set fromName to all PW outgoing emails? Link to comment Share on other sites More sharing options...
PWaddict Posted April 21, 2021 Author Share Posted April 21, 2021 Ok it's actually very easy to do it with a hook in ready.php: // Add fromName to all outgoing emails $wire->addHookBefore('WireMail::send', function(HookEvent $event) { $WireMail = $event->object; $WireMail->fromName('My Name'); $event->return = $WireMail; }); I tested it with Forgot Password, Padloper and Login Register Pro and it works great ? Link to comment Share on other sites More sharing options...
adrian Posted April 22, 2021 Share Posted April 22, 2021 This is probably the "right" way to do it: https://github.com/processwire/processwire/blob/d8945198f4a6a60dab23bd0462e8a6285369dcb9/wire/config.php#L1274-L1280 Also note that most / all WireMail modules have their own settings for this as well which is where I typically set it. 5 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now