aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter <peter@smitmail.eu>2014-12-19 22:33:17 +0200
committerPeter <peter@smitmail.eu>2014-12-19 22:33:17 +0200
commit2321b4b272c568ebcebf993c051c8ab60f651748 (patch)
tree7d93551f715eb53a5f5764e9fafed8b27060b9ea
parentb231b8c927d02c02466ea67742b63d2d67722bed (diff)
Change from header in email, fixes #765
-rw-r--r--conf/app.ini2
-rw-r--r--modules/mailer/mailer.go3
2 files changed, 2 insertions, 3 deletions
diff --git a/conf/app.ini b/conf/app.ini
index d6ee6ae4..d1178846 100644
--- a/conf/app.ini
+++ b/conf/app.ini
@@ -98,7 +98,7 @@ SUBJECT = %(APP_NAME)s
HOST =
; Do not verify the certificate of the server. Only use this for self-signed certificates
SKIP_VERIFY =
-; Mail from address
+; Mail from address. This can be just an email address, or the "Name" <email@example.com> format (including the quotes and brackets)
FROM =
; Mailer user name and password
USER =
diff --git a/modules/mailer/mailer.go b/modules/mailer/mailer.go
index 211ad59c..22f403ee 100644
--- a/modules/mailer/mailer.go
+++ b/modules/mailer/mailer.go
@@ -35,8 +35,7 @@ func (m Message) Content() string {
}
// create mail content
- content := "From: \"" + m.From + "\" <" + m.User +
- ">\r\nSubject: " + m.Subject + "\r\nContent-Type: " + contentType + "\r\n\r\n" + m.Body
+ content := "From: " + m.From +"\r\nSubject: " + m.Subject + "\r\nContent-Type: " + contentType + "\r\n\r\n" + m.Body
return content
}