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
Get encrypted function #19
Comments
Also, export the String method associated to Encryption Type For #19
Please see commit 31bc89d and let me know. Thanks. |
Yes, we can var encryptionTypesMap = map[string]Encryption{
"None": EncryptionNone,
"SSL/TLS": EncryptionSSL,
"STARTTLS": EncryptionTLS,
}
func GetEncryption(str string) Encryption {
return encryptionTypesMap[str]
} It's just an idea, and users can do it themselves |
I prefer users make this type of functions. A package should returns an error when key not exists or have a default value for that keys. An error need to be checked, and default values can give unintended behaviors. Use enum can avoid have to analyze this package and focus in developer code in those cases. Maybe I'm wrong. I'm here to learn, and add a new function is not a breaking change. Feel free to add a PR with your idea. |
with outlook I got Mail Error: SMTP Connection timed out..... |
@weidongbcn please create another issue with encryption type and port used. |
It's time to V3 so make all your ideas here: #53 |
now I'll close issues |
Please provide a function that can get the encryption, For example: SMTP = > encryption TLS
The text was updated successfully, but these errors were encountered: