We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello @xhit
First, thanks for the package !
Would it make sense to make the type type authType public like what you have done for Encryption?
authType
Encryption
So in a method which creates the SMTP client could take the authType as string then cast it to authType.
string
Cheers.
The text was updated successfully, but these errors were encountered:
Yes, make sense that change.
If you want to share a PR I will take a look in next hours. If not, I will commit the changes this night.
Sorry, something went wrong.
7bddd91
Done. Now you can use a func like this:
func AuthTypeFromString(authType string) (mail.AuthType, error) { switch { case strings.EqualFold(authType, "none"): return mail.AuthNone, nil case strings.EqualFold(authType, "plain"): return mail.AuthPlain, nil case strings.EqualFold(authType, "login"): return mail.AuthLogin, nil case strings.EqualFold(authType, "cram-md5"): return mail.AuthCRAMMD5, nil } return mail.AuthNone, fmt.Errorf(`invalid authentication type "%s"`, authType) }
Thank you so much !
No branches or pull requests
Hello @xhit
First, thanks for the package !
Would it make sense to make the type type
authType
public like what you have done forEncryption
?So in a method which creates the SMTP client could take the authType as
string
then cast it to authType.Cheers.
The text was updated successfully, but these errors were encountered: