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.
This commit is contained in:
Peter 2014-12-18 13:34:30 +02:00
parent 0a697517ac
commit 87be137b88
3 changed files with 49 additions and 19 deletions

View file

@ -94,7 +94,10 @@ SUBJECT = %(APP_NAME)s
; Mail server
; Gmail: smtp.gmail.com:587
; QQ: smtp.qq.com:25
; Note, if the port ends with "465", SMTPS will be used. Using STARTTLS on port 587 is recommended per RFC 6409. If the server supports STARTTLS it will always be used.
HOST =
; Do not verify the certificate of the server. Only use this for self-signed certificates
SKIP_VERIFY =
; Mail from address
FROM =
; Mailer user name and password