-
-
Notifications
You must be signed in to change notification settings - Fork 81
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
When using a custom auth implementation it's completely ignored. By the look of it this is caused by changes to make this thread safe.
Before: https://github.com/wneessen/go-mail/blob/v0.5.2/client.go#L1167-L1171
After: https://github.com/wneessen/go-mail/blob/v0.6.1/client.go#L1312-L1316
Note how c.smtpAuth is never used in the function, and it's value is only ever set or checked if it's nil, there is no other read action on c.smtpAuth.
Value being set: https://github.com/wneessen/go-mail/blob/v0.6.1/client.go#L511-L537
Only read action: https://github.com/wneessen/go-mail/blob/v0.6.1/client.go#L511-L537
To Reproduce
- Create a new client using NewClient and store it as variable
client - Implement a custom auth mechanism and apply it via client.SetSMTPAuthCustom
- Attempt to send an email to a server that requires authentication using client.DialWithContext(context.Background) and client.Send(msg)
Expected behaviour
The auth type should be respected.
Screenshots
No response
Attempted Fixes
No response
Additional context
No response
wneessen
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working