rohmann / global-smtp

WordPress Global SMTP
62 stars 27 forks source link

GLOBAL_SMTP_FROM_NAME #22

Closed amjad closed 5 years ago

amjad commented 5 years ago

I have this plugin installed on a WP multi-site setup. I have not defined GLOBAL_SMTP_FROM_NAME in wp-config.php. This is causing the emails to have Network Name in the from name of the email.

I would like to have the blog name from which the email is being sent, not the network name. How can I do that?

bubacarrsowe commented 5 years ago

I don't think there is a feature on this plugin to that. Sometimes ago, I got around this by using this plugin, https://wordpress.org/plugins/wp-mailfrom-ii/. It allows you to set the from email and name of subsite. You could have both installed and the whole network can use the same smtp host, username and password. Then on each subsite, you can enter the the from email and name.

amjad commented 5 years ago

Actually, I made it work with a forked version of this plugin. Pretty simple to do!

Change Line 33 to: $phpmailer->FromName = get_option('blogname');

bubacarrsowe commented 5 years ago

Awesome, that is a neat one. Which of the SMTP global settings did you add to the wp-config file?

amjad commented 5 years ago

@bubacarrsowe I put all the settings as mentioned in the readme, except GLOBAL_SMTP_FROM_NAME. I edited my post above with some more detail.

bubacarrsowe commented 5 years ago

If I get you, it looks like this? $phpmailer->FromName = get_option('blogname');

amjad commented 5 years ago

yes

bubacarrsowe commented 5 years ago

Thanks.