WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So I've managed to change mail_from used by WP to send e.g. new comment notifications by adding filters like that:

add_filter('wp_mail_from_name', 'get_name');
add_filter('wp_mail_from', 'get_email');

This part is working fine.

My problem is that I want to use gmail address with a plus sign like this one: example+something@gmail.com. The plus sign is legitimate to use in email address. I know wp_mail is using phpmailer but that is not a problem as I have successfully sent mails with phpmailer setting from header to such address.

When the filter sets mail_from to such address nothing is sent. Why would this happen?

share|improve this question
What happens when you try to send using an address with a +? Can you add debugging information – s_ha_dum May 8 '13 at 14:49
thanks fo the debug tip. i have some undefined variables but there is no difference in logs between sending notifications from 'regular' address and one with plus sign – machau May 9 '13 at 15:59
Have you checked the mail server log? – s_ha_dum May 9 '13 at 16:09
once again thanks for help @s_ha_dum. unfortunately i don't have access to server logs. i've managed to get some mail logs using wp_mail_log plugin but once again there was no difference between regular and plus sign address. – machau May 9 '13 at 18:07
I would suggest you try to get some imformation from your host. – s_ha_dum May 9 '13 at 18:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.