mirror of https://github.com/gophish/gophish
Added ability to have "{{.From}}" in sending a test email. Fixes #162
parent
6403a51c3e
commit
3f08c160ec
|
@ -72,6 +72,7 @@ type SendTestEmailRequest struct {
|
|||
URL string `json:"url"`
|
||||
Tracker string `json:"tracker"`
|
||||
TrackingURL string `json:"tracking_url"`
|
||||
From string `json:"from"`
|
||||
Target
|
||||
}
|
||||
|
||||
|
|
|
@ -178,9 +178,9 @@ func SendTestEmail(s *models.SendTestEmailRequest) error {
|
|||
Logger.Println(err)
|
||||
return err
|
||||
}
|
||||
ft := f.Name
|
||||
if ft == "" {
|
||||
ft = f.Address
|
||||
s.From = f.Name
|
||||
if s.From == "" {
|
||||
s.From = f.Address
|
||||
}
|
||||
Logger.Println("Creating email using template")
|
||||
// Parse the templates
|
||||
|
|
Loading…
Reference in New Issue