mirror of
https://github.com/kataras/iris.git
synced 2025-12-30 16:27:04 +00:00
E-mail sender
This commit is contained in:
@@ -83,7 +83,10 @@ type (
|
||||
// Render contains the configs for template and rest configuration
|
||||
Render Render
|
||||
|
||||
// Websocket contains the configs for Websocket's server integration
|
||||
Websocket Websocket
|
||||
// Mail contains the config for the mail sender service
|
||||
Mail Mail
|
||||
}
|
||||
|
||||
// Render struct keeps organise all configuration about rendering, templates and rest currently.
|
||||
@@ -121,6 +124,7 @@ func Default() Iris {
|
||||
Sessions: DefaultSessions(),
|
||||
Render: DefaultRender(),
|
||||
Websocket: DefaultWebsocket(),
|
||||
Mail: DefaultMail(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ func (c Logger) Merge(cfg []Logger) (config Logger) {
|
||||
return
|
||||
}
|
||||
|
||||
// Merge MergeSingle the default with the given config and returns the result
|
||||
// MergeSingle merges the default with the given config and returns the result
|
||||
func (c Logger) MergeSingle(cfg Logger) (config Logger) {
|
||||
|
||||
config = cfg
|
||||
|
||||
19
config/mail.go
Normal file
19
config/mail.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package config
|
||||
|
||||
// Mail keeps the configs for mail sender service
|
||||
type Mail struct {
|
||||
// Host is the server mail host, IP or address
|
||||
Host string
|
||||
// Port is the listening port
|
||||
Port int
|
||||
// Username is the auth username@domain.com for the sender
|
||||
Username string
|
||||
// Password is the auth password for the sender
|
||||
Password string
|
||||
}
|
||||
|
||||
// DefaultMail returns the default configs for Mail
|
||||
// returns just an empty Mail struct
|
||||
func DefaultMail() Mail {
|
||||
return Mail{}
|
||||
}
|
||||
Reference in New Issue
Block a user