Title: Invalid email sending loop error
Last modified: November 7, 2021

---

# Invalid email sending loop error

 *  Resolved [juato4](https://wordpress.org/support/users/juato4/)
 * (@juato4)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/invalid-email-sending-loop-error/)
 * Hi,
 * How are you.
 * I am having this issue. i have an email from a abandon cart that the customer
   write bad gmail, it put [@gmil](https://wordpress.org/support/users/gmil/).com..
   so, seems that the email is tring to sending with error every 5 min…
 * how i can fix this?.
 * look: [https://www.loom.com/i/23f46125dc5240a5bbb162451c524fcf](https://www.loom.com/i/23f46125dc5240a5bbb162451c524fcf)
 * the log error says:
 * [https://www.loom.com/i/141bcf9745124ebbaf4b96ed3b4e3d51](https://www.loom.com/i/141bcf9745124ebbaf4b96ed3b4e3d51)
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Finvalid-email-sending-loop-error%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 14 replies - 1 through 14 (of 14 total)

 *  [Sanjeev Aryal](https://wordpress.org/support/users/sanzeeb3/)
 * (@sanzeeb3)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/invalid-email-sending-loop-error/#post-15046284)
 * Hi [@juato4](https://wordpress.org/support/users/juato4/),
 * Thanks for reaching out. WP Mail SMTP does not automatically resend the emails
   when failed. It looks like the email is being sent with an empty recipient in
   such cases while the emails probably shouldn’t be sent at all. Please contact
   the CartBounty Pro plugin support and explain the issue.
 * I hope this helps!
 *  [Nauriskolats](https://wordpress.org/support/users/nauriskolats/)
 * (@nauriskolats)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/invalid-email-sending-loop-error/#post-15047366)
 * Hi [@juato4](https://wordpress.org/support/users/juato4/), thanks for your input
   and time looking into the issue.
 * CartBounty does not try to send email in case there is no email available. However
   we have noticed that this error is displayed in cases when the email recipient
   does not exist, for example if the user has entered “@giml.com” instead of “@gmail.
   com” email.
 * Any thoughts on that?
 *  Thread Starter [juato4](https://wordpress.org/support/users/juato4/)
 * (@juato4)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/invalid-email-sending-loop-error/#post-15048262)
 * Hi [@nauriskolats](https://wordpress.org/support/users/nauriskolats/) , [@sanzeeb3](https://wordpress.org/support/users/sanzeeb3/)
   yes, the problem is with “@giml.com”
 *  [Sanjeev Aryal](https://wordpress.org/support/users/sanzeeb3/)
 * (@sanzeeb3)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/invalid-email-sending-loop-error/#post-15049983)
 * Hey,
 * Thanks for the details! That sounds possible. However, I tested with Gmail’s 
   SMTP, and the email is sent to the non-existent recipient (@giml.com) as well.
 * [@juato4](https://wordpress.org/support/users/juato4/) – When you get a chance,
   can you please send a test email from **WP Mail SMTP > Tools > Email Test ** 
   to a non-existent receipent (@giml.com) and check the debug event.
 *  Thread Starter [juato4](https://wordpress.org/support/users/juato4/)
 * (@juato4)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/invalid-email-sending-loop-error/#post-15051301)
 * [@sanzeeb3](https://wordpress.org/support/users/sanzeeb3/) i did it… and it was
   sended without problems.
 * [@nauriskolats](https://wordpress.org/support/users/nauriskolats/) any suggest?.
 *  [Nauriskolats](https://wordpress.org/support/users/nauriskolats/)
 * (@nauriskolats)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/invalid-email-sending-loop-error/#post-15051398)
 * Thanks for responding!
 * I’m guessing that [@juato4](https://wordpress.org/support/users/juato4/) is using
   Otro SMTP for sending emails and not Gmail SMTP. So testing it with Gmail SMTP
   will not yield the same results as Otro SMTP, right [@sanzeeb3](https://wordpress.org/support/users/sanzeeb3/)?
 * Could you please test the sending email to a non-existent user via Otro SMTP?
 * Thanks
 *  Thread Starter [juato4](https://wordpress.org/support/users/juato4/)
 * (@juato4)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/invalid-email-sending-loop-error/#post-15051515)
 * [@nauriskolats](https://wordpress.org/support/users/nauriskolats/) [@sanzeeb3](https://wordpress.org/support/users/sanzeeb3/)
   yes, i am using other smtp.. not GMAIL.
 *  [Sanjeev Aryal](https://wordpress.org/support/users/sanzeeb3/)
 * (@sanzeeb3)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/invalid-email-sending-loop-error/#post-15053964)
 * Hi [@juato4](https://wordpress.org/support/users/juato4/), [@nauriskolats](https://wordpress.org/support/users/nauriskolats/),
 * Thanks for the details! I was also testing with Other SMTP using Gmail’s SMTP
   server.
 * Upon checking with the CartBounty plugin and refering to [this line](https://plugins.trac.wordpress.org/browser/woo-save-abandoned-carts/trunk/includes/class-cartbounty-wordpress.php#L169):
 * `$result = wp_mail( sanitize_email($to), $admin->sanitize_field($subject), $message,
   $headers );`
 * This means if the $to address is ‘@gmil.com’, `sanitize_email( '@gmail.com' )`
   will result in empty string. So, the error from WP Mail SMTP ‘You must provide
   at least one recipient email address’ is correct.
 * [@juato4](https://wordpress.org/support/users/juato4/) – your customer is probably
   writing emails such as [@gmil](https://wordpress.org/support/users/gmil/).com
   and not a valid but non-existent email such as [example@gmil.com](https://wordpress.org/support/topic/invalid-email-sending-loop-error/example@gmil.com?output_format=md)?
   While abandoning the cart, it is possible that users aren’t entering the valid
   email address. So, it should probably be validated before sending an email.
 * Thank you!
 *  [Nauriskolats](https://wordpress.org/support/users/nauriskolats/)
 * (@nauriskolats)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/invalid-email-sending-loop-error/#post-15054721)
 * Hi [@sanzeeb3](https://wordpress.org/support/users/sanzeeb3/),
 * Thank for looking into it! Really appreciate that!
 * Please allow me to add a little extra details there that should help a bit more.
   
   CartBounty is saving only valid email addresses so “@giml.com” would never be
   saved. The email that is in question here has been entered in the form of “nameSurname.
   @giml.com” and sanitizing this email is returning a valid email in the form of“
   nameSurname.@giml.com”.
 * Best,
    Nauris
 *  [Sanjeev Aryal](https://wordpress.org/support/users/sanzeeb3/)
 * (@sanzeeb3)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/invalid-email-sending-loop-error/#post-15057707)
 * Hi [@nauriskolats](https://wordpress.org/support/users/nauriskolats/),
 * Thanks for the confirmation! It turns out the error is reproducible with the 
   emails like “nameSurname.@giml.com”. If you send an email to this recipient using
   wp_mail(), the email will fail with that error. This is with or without using
   the WP Mail SMTP plugin. So, this error is coming from PHPMailer bundled within
   WordPress core and is because the email is not valid. PHPMailer seems to use 
   FILTER_VALIDATE_EMAIL to validate email.
 * It looks like expected behaviour. If you send an email to an invalid email address,
   it will fail.
 * [@juato4](https://wordpress.org/support/users/juato4/) – unless the failed emails
   are sent in the loop after every 5 min. as per the original question, I think
   there isn’t an issue to look into.
 * I hope this clarifies!
 *  [Nauriskolats](https://wordpress.org/support/users/nauriskolats/)
 * (@nauriskolats)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/invalid-email-sending-loop-error/#post-15057715)
 * Thanks [@sanzeeb3](https://wordpress.org/support/users/sanzeeb3/) for looking
   into it and getting to the bottom of the issue with where the error is coming
   from!
 *  Thread Starter [juato4](https://wordpress.org/support/users/juato4/)
 * (@juato4)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/invalid-email-sending-loop-error/#post-15058913)
 * [@nauriskolats](https://wordpress.org/support/users/nauriskolats/) Suppoust you
   have 1000 invalid emails trying to resending every 5 times… what could happen?
 *  [Nauriskolats](https://wordpress.org/support/users/nauriskolats/)
 * (@nauriskolats)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/invalid-email-sending-loop-error/#post-15060206)
 * Dear [@juato4](https://wordpress.org/support/users/juato4/), if you are getting
   that amount of emails, then you should switch to a professional email system 
   like MailChimp, ActiveCampaign or GetResponse instead as your default server 
   will have difficulties safely delivering that amount of emails.
 * And as [@sanzeeb3](https://wordpress.org/support/users/sanzeeb3/) already pointed
   out, there is nothing much that can be done there since the email name “nameSurname.
   @giml.com” is a perfectly valid email.
 * And the issue with sending out multiple consecutive emails is not really what
   CartBounty is doing. As I mentioned before, CartBounty is sending out a maximum
   of 3 reminders to each abandoned cart. If you see that there are more attempts,
   you should look into other reasons why this could be happening. You might try
   reaching out to your hosting provider to get some details.
 * And by the way, I know that our own mail server will try to deliver the email
   to a user 3 times in case the first time it was unable to do that. This is not
   related with plugins or anything else, but the hosting company’s mail server.
    -  This reply was modified 4 years, 7 months ago by [Nauriskolats](https://wordpress.org/support/users/nauriskolats/).
 *  [Sanjeev Aryal](https://wordpress.org/support/users/sanzeeb3/)
 * (@sanzeeb3)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/invalid-email-sending-loop-error/#post-15080444)
 * Hi [@nauriskolats](https://wordpress.org/support/users/nauriskolats/), [@juato4](https://wordpress.org/support/users/juato4/),
 * I’m marking the issue as resolved as this isn’t something to be fixed in WP Mail
   SMTP. If you’d like to check other email service providers instead of your hosting
   company’s mail server, we have a [list of available mailers](https://wpmailsmtp.com/docs/a-complete-guide-to-wp-mail-smtp-mailers/)
   within WP Mail SMTP.
 * If you have any questions, please feel free to continue the conversation.

Viewing 14 replies - 1 through 14 (of 14 total)

The topic ‘Invalid email sending loop error’ is closed to new replies.

 * ![](https://ps.w.org/wp-mail-smtp/assets/icon-256x256.png?rev=1755440)
 * [WP Mail SMTP by WPForms - The Most Popular SMTP and Email Log Plugin](https://wordpress.org/plugins/wp-mail-smtp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-mail-smtp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-mail-smtp/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-mail-smtp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-mail-smtp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-mail-smtp/reviews/)

 * 14 replies
 * 3 participants
 * Last reply from: [Sanjeev Aryal](https://wordpress.org/support/users/sanzeeb3/)
 * Last activity: [4 years, 6 months ago](https://wordpress.org/support/topic/invalid-email-sending-loop-error/#post-15080444)
 * Status: resolved