Commit Graph

55 Commits (1c7f95153402851b4aa293ae822250d6a8df6b21)

Author SHA1 Message Date
Jonas Bröms e86a0bf3fe Add support for extra sendmail arguments ()
* Add support for extra sendmail arguments

* Sendmail args to exec.command should be a list

* Add go-shellquote package

* Use go-shellquote lib for parsing Sendmail args

* Only parse if sendmail is configured
Rémi Saurel 66bc0ac251 Fix sending mail with a non-latin display name. ()
* Fix sending mail with a non-latin display name. 

Signed-off-by: Rémi Saurel <contact@remi-saurel.com>

* Take into account the possibility that setting.MailService.From is in `name <email@address>` format. 

Signed-off-by: Rémi Saurel <contact@remi-saurel.com>
Jonas Östanbäck eab4579e17 Fix fmt error in mailer ()
Jonas Östanbäck 01d7189c2d Fix slice out of bounds error in mailer ()
Bo-Yi Wu b7812be33a fix misspell ()
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Jonas Östanbäck d9a8eff2de Send mails as HTML as default. Setting for send as plain text. ()
* Send mails as HTML as default. Setting for send as plain text.
 * Add new option SendAsPlainText. remove EnableHTMLAlternative
 * Send HTML mails as default
 * Add html check if html2text should be performed

* Send only multipart or plain. Add deprication warning for ENABLE_HTML_ALTERNATIVE

* Still use ENABLE_HTML_ALTERNATIVE for backward compatibility

* Changed to not ignore html2text errors
Ethan Koenig 021904e4e6 Fix typos in models/ and modules/ ()
Gabriel Jackson bf6f61cc69 Cleanup log messaging
This change corrects a few logging issues:

 * Standardized formatting errors with '%v'.
 * Standardized failure warning word usage.
 * Corrected an instance of using the standard log library when
   the gitea log library should be used instead.
Bo-Yi Wu 6510e57758 fix gofmt error
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Philip Couling d4924d45d6 Implement sendmail ()
* Implemented sendmail. This piggybacks on existing configuration to keep the change simple

* Changed privicy of new sendSMTP and sendSendmail functions

* Fixed Lint errors

* Seperated SMTP and sendmail into their own senders

* Making new structs private as they should not be used externally now

* Added sendmail setting to ini file

* Minor code cleanup
Lunny Xiao 2e565bc1c4 Golint fixed for modules/mailer
Sandro Santilli 4247304f5a Update import paths from github.com/go-gitea to code.gitea.io ()
- Update import paths from github.com/go-gitea to code.gitea.io
- Fix import path for travis

See https://docs.travis-ci.com/user/languages/go#Go-Import-Path
Rémy Boulanouar 2d68bd1ef9 Change import reference to match gitea instead of gogs ()
Unknwon 62b0dc4853 Web editor: fix cannot create new file in subdirectory
Unknwon f1b8d52eb3 fix no mail notification when issue is closed/reopened
Unknwon 0240f520ab minor fix for when to set HTML alternative
Unknwon 8df3ba96f3 use text/plain as default email content format
Sandro Santilli d35a1c30f4 Do not write HTML in text/plain mail part ()
* Do not write HTML in text/plain mail part

Fixes 

* Pass text/plain first, text/html second

* Do not send plain/text email if html2text failed (untested)
Unknwon 926e75d721 strip whitespace for migrate URL
Also fix a possible race condition while install
Unknwon 2d3ecbe5b2 make mailer log more verbose
Unknwon 373731f5e8 user gomail and new activate account email tpl
- : fallback plain text
- : add date header
- : fix encoding of header
Unknwon e75fd2f783 simplify names
Unknwon b003b18788 Using commas to delineate emails
Hongcai Deng fbb3486c95 fix syntax error
Hongcai Deng 7b92dc3d9d implemented
Unknwon d7c3c79c00 minor fix on
Yixin Hao d720c92d99 Added supported of 'AUTH LOGIN'
i've been missing a 'r' in previous, lol~
Unknwon c47afdff58 add config options for HELO
无闻 3db80f2c55 Merge pull request from diseaz/mailer-client-cert
Use client certificate for SMTP over TLS
Gogs 2f1369c614 add error for hello func
Gogs 5293ae1221 Fix: 504 5.5.2 <localhost>: Helo command rejected
Dmitry Azhichakov 3aaf292ba8 Fix "forcing" client certificate for SMTP
Dmitry Azhichakov 8a6c86644e New feature: SMTP connection may use client certificate.
New config keys in [mailer] section:
 - CERT_FILE: path to a certificate file.
 - KEY_FILE: path to a key file.
Unknwon bd555551ce fix
无闻 030b3d751e Merge pull request from phsmit/correct_from
Correct usage of FROM in email creation
Peter c884ecfea1 Parse the from string to extract the email address
Peter edbe1de026 Remove unused "User" member of Message Struct and fix bounce address
The User member of a message is not needed anymore.

The from that is send to the server, should always be the "system" from. This is also called the Bounce address http://en.wikipedia.org/wiki/Bounce_address
Peter 2321b4b272 Change from header in email, fixes
Peter 007cf33e88 Remove standard mailer port lines
This lines got committed by accident. They do actually nothing, as SplitHostPort will give an error if port is not given.
Unknwon b231b8c927 update locale and mirror code format
Peter eca42bcb44 Prefer CRAM-MD5 over PLAIN authentication
Peter 5ffeca35e7 Add option to use CRAM-MD5 as authentication method in the mailer
Peter 87be137b88 Rewrite of SendMail function
The SendMail function is rewritten and has the following new functionality:
 - It is optional to skip verification of keys. The config option SKIP_VERIFY is added
 - If the port is 465, or ending on 465, the TLS(/SSL) connection is started first.
Alukardd 21081836ba Allow send mail without authentication if SMTP server allow this
mcheng89 b9881d1e7b check for smtp AUTH extension
Unknwon 39931f8e00 Allow mail with self-signed certificates
Michel Roux 6705559ce0 Fix malformed address
Unknwon 8dd07c0ddd New UI merge in progress
Unknown 688ec6ecbd Fixed
Unknown 4744996f9a Make gmail auth work