Support » Plugin: Email Users » From name not right
From name not right
-
Even if I specify an alternate name and address, emails are sent with the right address but the connected user’s name. I found only one instance of the wp_mail_from_name filter (in buddypress) and commented it out. Same issue…
-
Have you tried turning on “debug mode” to see what the constructed email headers look like?
Yes, I did and the name is fine in the debug.
If the name is correct when you view it in debug mode, then something outside of WordPress is manipulating the headers. It could be your mail transport or it could be your server.
It is hard to say what is causing it but the hook which intercepts the mail and displays in in debug mode is the last thing WordPress does before passing it off to the underlying server infrastructure so I don’t believe it is anything WordPress is doing nor is it something Email Users is doing.
Thanks, I will investigate in that direction…
Thanks, that was it. I had the Easy WP STMP plugin that was overriding the name.
But now, I get the opposite problem. I have a from name and address configured in your plugin options because I like to be able to select a from name and address on a per email basis. But, regardless of which I use (my account or the override), the from name is always equal to the override. The address is the correct one though.
I tried removing the override and I still receive the email with the blog name instead as the from name.
The wp_mail() debug shows the right name but the PHPMailer debug mode shows that the name was overridden. This suggests that the name was overriden by WP. I guess it’s got nothing to do with your code but can you point me in the right direction?
Thanks
wp_mail debug:
André Test Malenfant <maluspuerus@gmail.com>
2re234r
<html><head><title>2re234r</title></head><body><p>2r424r</p>
<h5 style=”border-top: 1px solid #eee;”></h5></body></html>
Array
(
[0] => From: “André Malenfant” <andre@lafuiteautourdumonde.com>
[1] => Return-Path: <andre@lafuiteautourdumonde.com>
[2] => Reply-To: “André Malenfant” <andre@lafuiteautourdumonde.com>
[3] => Content-Type: text/html; charset=”UTF-8″
)PHPMailer debug:
PHPMailer Object
(
[Priority] => 3
[CharSet] => UTF-8
[ContentType] => text/html
[Encoding] => 8bit
[ErrorInfo] =>
[From] => andre@lafuiteautourdumonde.com
[FromName] => Club de photo DECLIC
[Sender] =>
[ReturnPath] =>
[Subject] => 2re234r
[Body] =>
2r424r[AltBody] =>
[MIMEBody:protected] =>
[MIMEHeader:protected] =>
[mailHeader:protected] =>
[WordWrap] => 0
[Mailer] => mail
[Sendmail] => /usr/sbin/sendmail
[UseSendmailOptions] => 1
[PluginDir] =>
[ConfirmReadingTo] =>
[Hostname] =>
[MessageID] =>
[MessageDate] =>
[Host] => localhost
[Port] => 25
[Helo] =>
[SMTPSecure] =>
[SMTPAuth] =>
[Username] =>
[Password] =>
[AuthType] =>
[Realm] =>
[Workstation] =>
[Timeout] => 10
[SMTPDebug] =>
[Debugoutput] => echo
[SMTPKeepAlive] =>
[SingleTo] =>
[SingleToArray] => Array
(
)[LE] =>
[DKIM_selector] =>
[DKIM_identity] =>
[DKIM_passphrase] =>
[DKIM_domain] =>
[DKIM_private] =>
[action_function] =>
[Version] => 5.2.4
[XMailer] =>
[smtp:protected] =>
[to:protected] => Array
(
[0] => Array
(
[0] => maluspuerus@gmail.com
[1] => André Test Malenfant
))
[cc:protected] => Array
(
)[bcc:protected] => Array
(
)[ReplyTo:protected] => Array
(
)[all_recipients:protected] => Array
(
[maluspuerus@gmail.com] => 1
)[attachment:protected] => Array
(
)[CustomHeader:protected] => Array
(
[0] => Array
(
[0] => Return-Path
[1] =>
)[1] => Array
(
[0] => Reply-To
[1] => “André Malenfant”
))
[message_type:protected] =>
[boundary:protected] => Array
(
)[language:protected] => Array
(
)[error_count:protected] => 0
[sign_cert_file:protected] =>
[sign_key_file:protected] =>
[sign_key_pass:protected] =>
[exceptions:protected] => 1
)Never mind, I found my issue… It was buddy press that was overriding it, now that I hav it installed.
Thanks for your help!
Could you add two hooks, before and after sending mails in your next version? This way we could temporarily disable any other filters on the mail name and adresses…
e.b. do_action(’email_users_before_send_mail’);
and do_action(’email_users_after_send_mail’);Thanks
I have added hooks in the beta version of v4.6.10. See this post for details and hook names.
Email Users v4.6.10 is out, marking this as resolved.
- The topic ‘From name not right’ is closed to new replies.