|
|
|
@ -612,16 +612,17 @@ func newSessionService() {
|
|
|
|
|
|
|
|
|
|
// Mailer represents mail service.
|
|
|
|
|
type Mailer struct { |
|
|
|
|
QueueLength int |
|
|
|
|
Name string |
|
|
|
|
Host string |
|
|
|
|
From string |
|
|
|
|
User, Passwd string |
|
|
|
|
DisableHelo bool |
|
|
|
|
HeloHostname string |
|
|
|
|
SkipVerify bool |
|
|
|
|
UseCertificate bool |
|
|
|
|
CertFile, KeyFile string |
|
|
|
|
QueueLength int |
|
|
|
|
Name string |
|
|
|
|
Host string |
|
|
|
|
From string |
|
|
|
|
User, Passwd string |
|
|
|
|
DisableHelo bool |
|
|
|
|
HeloHostname string |
|
|
|
|
SkipVerify bool |
|
|
|
|
UseCertificate bool |
|
|
|
|
CertFile, KeyFile string |
|
|
|
|
EnableHTMLAlternative bool |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var ( |
|
|
|
@ -636,17 +637,18 @@ func newMailService() {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
MailService = &Mailer{ |
|
|
|
|
QueueLength: sec.Key("SEND_BUFFER_LEN").MustInt(100), |
|
|
|
|
Name: sec.Key("NAME").MustString(AppName), |
|
|
|
|
Host: sec.Key("HOST").String(), |
|
|
|
|
User: sec.Key("USER").String(), |
|
|
|
|
Passwd: sec.Key("PASSWD").String(), |
|
|
|
|
DisableHelo: sec.Key("DISABLE_HELO").MustBool(), |
|
|
|
|
HeloHostname: sec.Key("HELO_HOSTNAME").String(), |
|
|
|
|
SkipVerify: sec.Key("SKIP_VERIFY").MustBool(), |
|
|
|
|
UseCertificate: sec.Key("USE_CERTIFICATE").MustBool(), |
|
|
|
|
CertFile: sec.Key("CERT_FILE").String(), |
|
|
|
|
KeyFile: sec.Key("KEY_FILE").String(), |
|
|
|
|
QueueLength: sec.Key("SEND_BUFFER_LEN").MustInt(100), |
|
|
|
|
Name: sec.Key("NAME").MustString(AppName), |
|
|
|
|
Host: sec.Key("HOST").String(), |
|
|
|
|
User: sec.Key("USER").String(), |
|
|
|
|
Passwd: sec.Key("PASSWD").String(), |
|
|
|
|
DisableHelo: sec.Key("DISABLE_HELO").MustBool(), |
|
|
|
|
HeloHostname: sec.Key("HELO_HOSTNAME").String(), |
|
|
|
|
SkipVerify: sec.Key("SKIP_VERIFY").MustBool(), |
|
|
|
|
UseCertificate: sec.Key("USE_CERTIFICATE").MustBool(), |
|
|
|
|
CertFile: sec.Key("CERT_FILE").String(), |
|
|
|
|
KeyFile: sec.Key("KEY_FILE").String(), |
|
|
|
|
EnableHTMLAlternative: sec.Key("ENABLE_HTML_ALTERNATIVE").MustBool(), |
|
|
|
|
} |
|
|
|
|
MailService.From = sec.Key("FROM").MustString(MailService.User) |
|
|
|
|
log.Info("Mail Service Enabled") |
|
|
|
|