I'm using the Mailchimp STS plugin for Wordpress, which uses Amazon SES for transactional emails. The plugin is set up correctly, but the default "From" name appears only as "andrew" in sent emails. Since there is no option to change this in the plugin's settings, I assume this is being grabbed from my email address (e.g. andrew@domain.com).

I found this code in the plugin:

// Plugin authors can override the potentially troublesome default
$phpmailer->From     = apply_filters( 'wp_mail_from', $from_email );
$phpmailer->FromName = apply_filters( 'wp_mail_from_name', $from_name  );

How can I change it so that I can display a custom "From" name (e.g. My Name, Company).


There are two modes email can be sent with the plugin:

  • simple emails are sent through STS;
  • email with anything that STS doesn't support (custom headers, attachments, etc) are sent through fallback function, that is simply copy of native wp_mail() function.

For former plugin doesn't set from name at all. For latter it default to WordPress and goes through those filters you found.

Since neither fits your description I think it is simply email client, that you are checking this with, is taking part of email to show as (missing) name.

So this is not something you currently do, because wp_mail_from_name filter is not used by plugin's code. But it should be. I claim "it's beta" defence and off to create ticket so this is corrected in next version. Sorry for inconvenience!

| improve this answer | |

I needed to do this too so I hacked it in. This code, which replaces the mailchimp-sts.php file, adds a field to the STS settings page where you can set a name to go in the from header.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.