implemented the E-mail sending functionality
This commit is contained in:
+10
-6
@@ -59,12 +59,14 @@ type AmConfig struct {
|
||||
Dsn string `yaml:"dsn"`
|
||||
} `yaml:"database"`
|
||||
Email struct {
|
||||
Host string `yaml:"host"`
|
||||
Port int `yaml:"port"`
|
||||
Tls string `yaml:"tls"`
|
||||
AuthType string `yaml:"authType"`
|
||||
User string `yaml:"user"`
|
||||
Password string `yaml:"password"`
|
||||
Host string `yaml:"host"`
|
||||
Port int `yaml:"port"`
|
||||
Tls string `yaml:"tls"`
|
||||
AuthType string `yaml:"authType"`
|
||||
User string `yaml:"user"`
|
||||
Password string `yaml:"password"`
|
||||
Signature string `yaml:"signature"`
|
||||
Disclaimer string `yaml:"disclaimer"`
|
||||
} `yaml:"email"`
|
||||
Rendering struct {
|
||||
TemplateDir string `yaml:"templatedir"`
|
||||
@@ -128,6 +130,8 @@ func overlayConfig(dest *AmConfig, loaded *AmConfig, defaults *AmConfig) {
|
||||
dest.Email.AuthType = overlayString(loaded.Email.AuthType, defaults.Email.AuthType)
|
||||
dest.Email.User = overlayString(loaded.Email.User, defaults.Email.User)
|
||||
dest.Email.Password = overlayString(loaded.Email.Password, defaults.Email.Password)
|
||||
dest.Email.Signature = overlayString(loaded.Email.Signature, defaults.Email.Signature)
|
||||
dest.Email.Disclaimer = overlayString(loaded.Email.Disclaimer, defaults.Email.Disclaimer)
|
||||
dest.Rendering.TemplateDir = overlayString(loaded.Rendering.TemplateDir, defaults.Rendering.TemplateDir)
|
||||
dest.Rendering.CookieKey = overlayString(loaded.Rendering.CookieKey, defaults.Rendering.CookieKey)
|
||||
}
|
||||
|
||||
@@ -23,6 +23,12 @@ email:
|
||||
authType: plain
|
||||
user: jrn
|
||||
password: foobiebletch
|
||||
signature: |-
|
||||
Amsterdam - community services, conferencing and more. <http://git.erbosoft.com/amy/amsterdam>
|
||||
disclaimer: |-
|
||||
Message sent via Amsterdam Web Communities System - <http://git.erbosoft.com/amy/amsterdam>
|
||||
The Amsterdam Project is not responsible for the contents of this message
|
||||
Report abuses to: <abuse@example.com>
|
||||
rendering:
|
||||
templatedir: custom_templates
|
||||
cookiekey: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
|
||||
Reference in New Issue
Block a user