Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Сould not send email if it have dot before @ in address #199

Open
kko123 opened this issue Jun 15, 2024 · 1 comment
Open

Сould not send email if it have dot before @ in address #199

kko123 opened this issue Jun 15, 2024 · 1 comment

Comments

@kko123
Copy link

kko123 commented Jun 15, 2024

If you will try to send mail to any address like [email protected], you will get error:
gomail: could not send email 1: gomail: invalid address "[email protected]": mail: missing '@' or angle-addr
But address is fully working and receive email from another clients.

@wneessen
Copy link

wneessen commented Jul 3, 2024

Even though you mail server might accept this mail address, according to RFC 5322 this address is not valid.

RFC 5322 Section 3.4.1: "Addr-spec specification" provides the complete syntax of an email address (addr-spec).

addr-spec       = local-part "@" domain
local-part      = dot-atom / quoted-string / obs-local-part
dot-atom        = [CFWS] dot-atom-text [CFWS]
dot-atom-text   = atom *("." atom)
atom            = [A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+

dot-atom-text specifies that the local-part cannot have leading or trailing dots, nor can it have consecutive dots.

Btw. this packages is also not actively maintained anymore. It hasn't seen an update in the last 6 years. You might wanna consider switching to wneessen/go-mail - this package won't accept that mail address neither, as both packages make use of Go's Stdlib net/mail address parser which follows RFC 5322.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants