As you mentioned, it could be a plugin. Tracking that down would require deactivating other plugins and retesting to find out. Tracking down the actual problem is really what you need to do.
However, in absence of actually finding the problem, you may be able to filter out the new line indicator with the following filter (add it to your theme’s functions.php):
add_filter( 'wp_mail', 'my_wp_mail_filter' );
function my_wp_mail_filter( $args ) {
$args['to'] = str_replace( '\n', '', $args['to'] );
return $args;
}
This should take the “to” address and run str_replace()
to replace any instances of “\n” with an empty value.
Related Posts:
- Sending multipart (text/html) emails via wp_mail() will likely get your domain banned
- How to set SMTP programmatically
- Do something after sending email
- Include HTML template file in wp_mail
- Email sent from WordPress has HTML tags
- Reset Password – change from name and email address
- Few chars getting replaced with ‘=’ in mail content in wp_mail()
- wp_mail recipient array not sending?
- On form submission how to send 2 email to different users
- How to Configure SMTP on wordpress Cant Send Email
- How to add line breaks to $email[‘body’] when using auto_core_update_email hook
- Joining confirmation email
- How to setup SMTP for only one specific wp_mail()
- Must I change the admin user email address while changing the general email address?
- User invite email not delivered – related to subdomain?
- Can I configure WordPress to use postfix without a plugin?
- Email ‘from address’ has a www in it
- Trigger WordPress Actions from Email?
- PHP mail() works but wp_mail() does not
- WP mail sent to MS Exchange recipients = occasional email corruption?
- WordPress unable to send mail
- Not able to send links in email after setting header
- Emailing passwords: Setup installed on home server using XAMPP
- Mail function is not working
- Send bulk emails without timeout
- What is the best way to send out thousands of emails from a WordPress site? [closed]
- Change the Sender(not From) on wp_mail() function [closed]
- Prevent sending emails on user creation in OOP context?
- WordPress email could not be sent
- Send email daily using `wp_mail`
- wp_mail() won’t send mail when it’s a variable, only when hard coded
- Send email for confirmation during user registration
- Images in wp_mail not showing
- Email sent from WordPress has HTML tags
- wp_mail send multiple emails in a loop
- Can’t change headers / From for wp_mail()
- How can I remove the product short description from the WooCommerce Mails?
- New user notification issue
- wp_mail() not sending emails with ajax
- wordpress wp mail not changing sender mail
- Whitelist email sent by WordPress
- WP Mail isn’t sending user account messages, does send from plugins
- Asynchronous emailing
- Send email from WordPress
- Is there a way to embed an iframe in an email with text that updates?
- Disable user registration password email
- “Reply-to Address” Email
- Disable new user notification to admin email
- Mail will not send in HTML
- How to disable automated E-Mail on PHP error/exception?
- Email stats at Ma.tt contact form
- Transferring contact form input to an email account without using an email-proxy
- Contact Form 7 + Configure SMTP: Sender email appearing as my own email [closed]
- Should I use wp_mail or PHP’s mail? [duplicate]
- How to create a CSV on the fly and send as an attachment using wp_mail?
- Disable WP notifications for commenting on own posts
- Obfuscating Email Addresses in Form Fields
- Is there no way to send email using SMTP without plugin or custom coding?
- Send email daily from WordPress site
- Mechanism to send to users of secured WordPress install new notifications by SMS or email?
- How to change the Customer new account email
- Is it possible to change an existing post status from ‘pending’ to ‘publish’ via email?
- How to set custom from email address in wp
- How to translate WordPress Emails?
- wp_mail() not sending email in multisite subdomain
- Script or plugin to send activation email automatically again after 2 hours
- Google Apps SMTP for WP MultiSite?
- Does the WordPress core software handle bounces on system email?
- how to email username and password to admin of new registration
- show a little contact form in homepage without plugin
- reply via email link under each post
- Sending HTML email containing custom fields to site users from WordPress
- How to stop WordPress from sending mails?
- Auto Log In Users after registration and send confirmation email
- Using PHP mail; getting Header warning
- Send confirmation email when a user’s role is upgraded
- Emailing system monitoring with WP
- Mailing issues with wordpress?
- I want to setup a button/popup/whatever that will prompt users on the site to input their email address
- Using wp_mail to send email?
- User Without Email?
- WordPress new user email formatting issues
- email saying that was not possible to send the email
- could not call wp_email function twice
- Updated : how to make email optional while user registration using default wordpress form
- Email post to submitter
- Contact Form 7 How to Alter the From email address?
- Check if “Send the new user an email about their account” is ticked
- Wp_mail doesnt work
- User Registration – no Email required
- Email Piping using google apps within WP Engine
- Download Free Trial After Email Entered
- Email notification
- Custom notification for contributors when posts are scheduled
- User profile update author
- What is the correct way to send multipart email in wordpress?
- What’s the simplest way to send WordPress posts to a Mailchimp list? [closed]
- Fighting Spam – What can I do as an: Email Administrator, Domain Owner, or User?
- How to add verification on email address change?
- Is there a wordpress function restrict public email id for registration like as is_email()