mirror of
https://github.com/axllent/mailpit.git
synced 2026-04-26 08:45:54 +03:00
[GH-ISSUE #4] SMTP doesn't support AUTH #5
Labels
No labels
awaiting feedback
bug
docker
documentation
enhancement
github_actions
invalid
pull-request
question
stale
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/mailpit#5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kaptinlin on GitHub (Aug 5, 2022).
Original GitHub issue: https://github.com/axllent/mailpit/issues/4
Hi, I got a error when send via smtp
@axllent commented on GitHub (Aug 5, 2022):
The SMTP server doesn't currently support authentication, it's just open/non-encrypted. Can you please tell me your use-case and requirements?
@kaptinlin commented on GitHub (Aug 5, 2022):
Some lib check username and password, and using
smtp.PlainAuthsend emails. If there is no username and password, it dont work.Another node.js based app maildev can work with it. But if mailpit can support it that would be better.
@axllent commented on GitHub (Aug 5, 2022):
@KaptinLin I have started working on this feature.
I think you are going to hit some major issues with this go-mail library though as it appears to have very limited SMTP options. To use SMTP authentication (with go-mail ~ or any compliant SMTP client) TLS must be enabled on the SMTP server (this is standard). That's OK (I am adding this option), however go-mail also requires that the SSL certificate be valid, officially signed (no self-signed certificates), and the certificate AltName (not the FQDN / Fully Qualified Domain Name) must match the SMTP
mail.Config.URL- else go-mail just refuses to send (errors).So yes, support for this is coming soon, however I don't think you will get very far with go-mail unless you are using a FQDN with a valid, signed SSL certificate (not self-signed) - such as a public server with a valid Let's Encrypt certificate.
In my local test (Mailpit support for SMTP TLS / auth will be released in the next few hours) I couldn't find any way of telling go-mail to skip certificate verification. What I tried was:
~ but this just did not work for go-mail no matter what I tried. I was however able to get it working locally with jordan-wright/email which dos allow you to skip SSL verification. I am just mentioning this as I think you may get stuck with go-mail (unless you find a work-around that I didn't find).....
@axllent commented on GitHub (Aug 6, 2022):
@KaptinLin I have added SMTP STARTTLS & authentication to the 0.1.0 release. As I mentioned previously, unless you are using a resolvable and public DNS with an ifficially signed certificate, I don't think the go-mail library will work. If you do however manage to find a way to get it to
InsecureSkipVerifythen please let me know.@kaptinlin commented on GitHub (Aug 6, 2022):
Awesome! It seems good.