Ssmtp default email address

Hello there,

I wish to know where can I config the wordpress system mail ?

I received a system mail for reset pass/ create user from

It’s possible I can change that email address? such as

I believe this is done through WP itself:

1 Like

Hm, I’ve added this to my site

add_filter('wp_mail_from', __NAMESPACE__ . '\\new_mail_from');
function new_mail_from($old) {
    return 'info@mydomain.tld';

add_filter('wp_mail_from_name', __NAMESPACE__ . '\\new_mail_from_name');
function new_mail_from_name($old) {
    return 'Information';

but it sends mail as web@mydomain.tld anyway.

Adding this
into /etc/ssmtp/revaliases

Worked for me. But cannot control the from name this way it seems.

@intelligence Your code should work. I have just tested it myself. No need for the namespaces:

add_filter('wp_mail_from', function ($email) {
    return '';

add_filter('wp_mail_from_name', function ($name) {
    return 'My Company';

My emails came through from My Company when using this method with GSuite / Gmail. Maybe other providers don’t let you override the from address…

1 Like