have a look at the rfc especially regarding commen...
# lucee
t
have a look at the rfc especially regarding comments
j
I am not an expert in RFC's, do you a have a number of even better a link?
r
Yep, that is valid. You'd be surprised at what an email address can contain.
👍🏻 1
👍 1
👍🏻 1
t
wikipedia is a good starting point as it also lists the revisions https://en.wikipedia.org/wiki/Email_address
👍🏻 1
r
I love this example of a legal email address
Pete(A nice \) chap) <pete(his account)@silly.test(his host)>
😅 1
t
I think you need to escape commas
j
Escaping the comma (
<mailto:foo@bar.org|foo@bar.org> (please\, do not use!!!)
) also throws an error, removing the comma fixes the issue.
But still I think it's strange Lucee accepts the given email address as valid, but then refuses to send a mail to it.
r
You can probably blame that on ACF's implementation, which Lucee implemented as well, to allow commas as separators for multiple recipients.
✅ 1
I had to write an email validator on CF4 back in 1998. It was a nightmare because my boss insisted we meet all the requirements of the RFC.
🙏🏻 1
😂 1
e
What I find strange is Lucee, is an open-source product, and everyone bitches about some tag or command not working EXACTLY like AFC; yet somehow they usually haven't sponsored the project nor are willing to sponsor a fix. Just my take. As for email, lucee will send email, but if you are not sending an email with lucee but it worked in AFC, your code more than likely needs updated to something this century.
r
The code won't work in ACF or Lucee.
👍🏻 1
g
The built-in function allows too much that won't be allowed by other validators. I wrote an internal ACF/Lucee-compatible UDF that leverages the isEmail Java library (to optionally test DNS/MX records.) I also added noreply & Google dot/plus sanitizing and checks against disposable domains & invalid TLDs.
g
Could you share that? Or even make a PR?
g
I intend to rewrite it as a separate CFC as it's current entangled with logic from our global application framework. (I haven't had any extra time recently due to end-of-year project deadlines.)
👍🏼 1
👍🏻 1