[wp-trac] [WordPress Trac] #47467: is_email and PHPMailer validateAddress() method does not match
WordPress Trac
noreply at wordpress.org
Mon Jun 3 14:21:42 UTC 2019
#47467: is_email and PHPMailer validateAddress() method does not match
--------------------------+-----------------------------
Reporter: ggPixel | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Mail | Version:
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
Sorry if this is not meant to be posted here.
Before sending an email using **wp_mail()**, I check email addresses with
**is_email()** to make sure its valid. It kept on failing with PHPMailer
returning an error ''"You must provide at least one recipient email
address"'' even though **is_email()** returns a valid email address. After
some investigation I realised that PHPMailer does its own validation on
emails and it failed.
In my case the email that failed had a dot in front of the @ symbol
(test. at gmail.com).
My questions is, shouldn't is_email() and PHPMailer's validateAddress()
method work the same?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47467>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list