mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-21 03:27:01 +00:00
Add customizable greeting to index page
Allow an organization to copy the greeting.html file out of the themes directory, customize it, then point the greeting.file config option at it so that it will survive Inbucket upgrades.
This commit is contained in:
@@ -25,7 +25,7 @@ type SmtpConfig struct {
|
||||
type Pop3Config struct {
|
||||
Ip4address net.IP
|
||||
Ip4port int
|
||||
Domain string
|
||||
Domain string
|
||||
MaxIdleSeconds int
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ type WebConfig struct {
|
||||
TemplateDir string
|
||||
TemplateCache bool
|
||||
PublicDir string
|
||||
GreetingFile string
|
||||
}
|
||||
|
||||
type DataStoreConfig struct {
|
||||
@@ -328,6 +329,13 @@ func parseWebConfig() error {
|
||||
}
|
||||
webConfig.PublicDir = str
|
||||
|
||||
option = "greeting.file"
|
||||
str, err = Config.String(section, option)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Failed to parse [%v]%v: '%v'", section, option, err)
|
||||
}
|
||||
webConfig.GreetingFile = str
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user