mirror of
https://github.com/slurdge/goeland.git
synced 2026-11-11 13:13:58 +00:00
[GH-ISSUE #11] Expose configuration for authentication #4
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: slurdge/goeland#4
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 @dfosas on GitHub (Jan 22, 2022).
Original GitHub issue: https://github.com/slurdge/goeland/issues/11
Originally assigned to: @slurdge on GitHub.
I have been playing with this fantastic project but it took me a while to get it working with a particular smtp server. It seemed to boil down to authentication options. It seems like
AuthPlainis the default but the underlying package allows for other options, needingAuthLoginin my case.I have no idea of go or smtp, but I got to a minimal working example with the following additions to run.go by looking at the surrounding code:
which allows configuration files to have an
email.authfield.Happy to do a pull request as per the contributing guidelines with that change and updating the documentation if that sounds sensible, but I am afraid I do not know how to go about tests here.
Many thanks!
@slurdge commented on GitHub (Jan 22, 2022):
Hey,
Thanks for the report and for the kind words. It's really appreciated.
Your patch seems about right! The only thing I would add is also that the option is defaulted also in the viper config:
And also add "none"=>"AuthNone" for those who wish no auth (I'm not sure of the use case but maybe for SMTP behind firewalls...)
If you wish to do a PR that's absolutely fine by me. I prefer you get the credit for this patch, it's a great find!
As for the tests, I didn't take the time to properly do it... Especially with this piece of software since it's mainly related to connecting to real world servers.
Thanks!
@dfosas commented on GitHub (Jan 23, 2022):
Fantastic. See pull request, hopefully that is all correct. Thanks!
@slurdge commented on GitHub (Jan 23, 2022):
👍 Should be good, publishing v0.9.0 right now