|
|
@ -752,7 +752,7 @@ func newSessionService() { |
|
|
|
// Mailer represents mail service.
|
|
|
|
// Mailer represents mail service.
|
|
|
|
type Mailer struct { |
|
|
|
type Mailer struct { |
|
|
|
QueueLength int |
|
|
|
QueueLength int |
|
|
|
Name string |
|
|
|
Subject string |
|
|
|
Host string |
|
|
|
Host string |
|
|
|
From string |
|
|
|
From string |
|
|
|
FromEmail string |
|
|
|
FromEmail string |
|
|
@ -762,7 +762,7 @@ type Mailer struct { |
|
|
|
SkipVerify bool |
|
|
|
SkipVerify bool |
|
|
|
UseCertificate bool |
|
|
|
UseCertificate bool |
|
|
|
CertFile, KeyFile string |
|
|
|
CertFile, KeyFile string |
|
|
|
EnableHTMLAlternative bool |
|
|
|
UsePlainText bool |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var ( |
|
|
|
var ( |
|
|
@ -778,7 +778,7 @@ func newMailService() { |
|
|
|
|
|
|
|
|
|
|
|
MailService = &Mailer{ |
|
|
|
MailService = &Mailer{ |
|
|
|
QueueLength: sec.Key("SEND_BUFFER_LEN").MustInt(100), |
|
|
|
QueueLength: sec.Key("SEND_BUFFER_LEN").MustInt(100), |
|
|
|
Name: sec.Key("NAME").MustString(AppName), |
|
|
|
Subject: sec.Key("SUBJECT").MustString(AppName), |
|
|
|
Host: sec.Key("HOST").String(), |
|
|
|
Host: sec.Key("HOST").String(), |
|
|
|
User: sec.Key("USER").String(), |
|
|
|
User: sec.Key("USER").String(), |
|
|
|
Passwd: sec.Key("PASSWD").String(), |
|
|
|
Passwd: sec.Key("PASSWD").String(), |
|
|
@ -788,7 +788,7 @@ func newMailService() { |
|
|
|
UseCertificate: sec.Key("USE_CERTIFICATE").MustBool(), |
|
|
|
UseCertificate: sec.Key("USE_CERTIFICATE").MustBool(), |
|
|
|
CertFile: sec.Key("CERT_FILE").String(), |
|
|
|
CertFile: sec.Key("CERT_FILE").String(), |
|
|
|
KeyFile: sec.Key("KEY_FILE").String(), |
|
|
|
KeyFile: sec.Key("KEY_FILE").String(), |
|
|
|
EnableHTMLAlternative: sec.Key("ENABLE_HTML_ALTERNATIVE").MustBool(), |
|
|
|
UsePlainText: sec.Key("USE_PLAIN_TEXT").MustBool(), |
|
|
|
} |
|
|
|
} |
|
|
|
MailService.From = sec.Key("FROM").MustString(MailService.User) |
|
|
|
MailService.From = sec.Key("FROM").MustString(MailService.User) |
|
|
|
|
|
|
|
|
|
|
|