]> source.dussan.org Git - gitea.git/commitdiff
Change from header in email, fixes #765
authorPeter <peter@smitmail.eu>
Fri, 19 Dec 2014 20:33:17 +0000 (22:33 +0200)
committerPeter <peter@smitmail.eu>
Fri, 19 Dec 2014 20:33:17 +0000 (22:33 +0200)
conf/app.ini
modules/mailer/mailer.go

index d6ee6ae4d434e4d94b8ae3048a34dfdfcacba72e..d117884676e7ea2cf8c1de41d17962b78dfae22c 100644 (file)
@@ -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 =
index 211ad59cdda15eba4208b3fb08c6b3f61c175033..22f403ee51a7e5b91d251b83baff628c52da4206 100644 (file)
@@ -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
 }