]> www.vanbest.org Git - motioneye-debian/commitdiff
sendmail: destination email address is now used as "from"
authorCalin Crisan <ccrisan@gmail.com>
Sun, 27 Sep 2015 17:28:09 +0000 (20:28 +0300)
committerCalin Crisan <ccrisan@gmail.com>
Sun, 27 Sep 2015 17:28:09 +0000 (20:28 +0300)
motioneye/sendmail.py

index 10746f1afed5a4bcac42d76bfb743bb2ddcbc35f..5c64556c07bac775f826831a1920deb86107419e 100644 (file)
@@ -53,7 +53,7 @@ def send_mail(server, port, account, password, tls, to, subject, message, files)
     if account and password:
         conn.login(account, password)
     
-    _from = account or 'motioneye@' + socket.gethostname()
+    _from = 'motionEye on %s <%s>' % (socket.gethostname(), to[0])
     
     email = MIMEMultipart()
     email['Subject'] = subject