Custom created emails using wp_mail() with display name have empty send to
-
In the latest version of PostSMTP emails created programmatically do not have the email to field. See here: https://prnt.sc/rEsvS8mRNn27
This happened on 2 different websites where I updated from PostSMTP 3.1.1 to the latest version.
The emails are created via code and sent using wp_mail() Where the $to variable would look like this:
John Doe <[email protected]>
This helps emails more likely land in the inbox instead of Spam because the user’s name is known by the application and would most likely match the name on the email account.
I had to downgrade back to v3.1.1 for things to work fine again.
Note that the emails seem to be sent fine, I can see them in the SMTP service and it shows Success in the PostSMTP logs. Its just the “Sent to” and the “to” field shown in PostSMTP logs showing up blank.
—
There is also a related thread about handling emails created like this: https://wordpress.org/support/topic/not-handling-nice-email-to-properly/
- You must be logged in to reply to this topic.