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