mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-07-26 20:00:27 +03:00
Minor fixes
Minor fixes
This commit is contained in:
parent
c31636b66e
commit
e9b628cd3f
3 changed files with 4 additions and 5 deletions
|
@ -20,7 +20,7 @@ type SmtpMail struct {
|
|||
from string
|
||||
}
|
||||
|
||||
func AuthType(authType string) mail.AuthType {
|
||||
func authType(authType string) mail.AuthType {
|
||||
switch strings.ToUpper(authType) {
|
||||
case "PLAIN":
|
||||
return mail.AuthPlain
|
||||
|
@ -31,7 +31,7 @@ func AuthType(authType string) mail.AuthType {
|
|||
}
|
||||
}
|
||||
|
||||
func EncryptionType(encryptionType string) mail.Encryption {
|
||||
func encryptionType(encryptionType string) mail.Encryption {
|
||||
switch strings.ToUpper(encryptionType) {
|
||||
case "SSL":
|
||||
return mail.EncryptionSSL
|
||||
|
@ -45,7 +45,7 @@ func EncryptionType(encryptionType string) mail.Encryption {
|
|||
}
|
||||
|
||||
func NewSmtpMail(hostname string, port int, username string, password string, noTLSCheck bool, auth string, fromName, from string, encryption string) *SmtpMail {
|
||||
ans := SmtpMail{hostname: hostname, port: port, username: username, password: password, noTLSCheck: noTLSCheck, fromName: fromName, from: from, authType: AuthType(auth), encryption: EncryptionType(encryption)}
|
||||
ans := SmtpMail{hostname: hostname, port: port, username: username, password: password, noTLSCheck: noTLSCheck, fromName: fromName, from: from, authType: authType(auth), encryption: encryptionType(encryption)}
|
||||
return &ans
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue