Skip to content

"Not a valid email address" #79

@flintforge

Description

@flintforge

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 ?

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtriage

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions