Hi,
First many thanks for writing denomailer ! (This inner log:true option makes it very convenient to debug!)
Description of the bug
Writing emails to user@domain
with domain not being a FQDN with a TLD but a host
is a very convenient way to send signals to admins
and is usually the first try that I give to an SMTP lib.
So I'm sending emails to me@localhost : yes, that's a valid email address
(_"although ICANN highly discourages dotless email addresses[1]"_)
However the lib replies :
Error: No valid emails provided!
Which is a bit vague in regard to the address
Same goes for the sender address:
Error: The specified from adress is not a valid email adress.
a clearer message, however with two typos
A look at the validator email → email.ts:19
shows one regexp, which will eventually considers faulty ones as valid :
Validating email address is a complex expression. May I recommend :
using an external heavily tested library
adding an option to bypass the validity check of email address and just let the MTA do the job,
by sending mail delivery status and/or simply rejecting them ?
Hi, First many thanks for writing denomailer ! (This inner
log:true
option makes it very convenient to debug!)Description of the bug
Writing emails to user@domain with domain not being a FQDN with a TLD but a host is a very convenient way to send signals to admins and is usually the first try that I give to an SMTP lib.
So I'm sending emails to
me@localhost
: yes, that's a valid email address (_"although ICANN highly discourages dotless email addresses[1]"_)However the lib replies : Error: No valid emails provided! Which is a bit vague in regard to the address
Same goes for the sender address: Error: The specified from adress is not a valid email adress. a clearer message, however with two typos
A look at the validator email → email.ts:19 shows one regexp, which will eventually considers faulty ones as valid :
john..doe@example.org
(double dot)1234567890123456789012345678901234567890123456789012345678901234+x@example.com
> 64 bytesValidating email address is a complex expression. May I recommend :