Do not send notification if users doesn't have an email
[2019-09-03 15:47:14,532][WARNING][10.255.1.106][none][CP Server Thread-12][rdiffweb.core.user] IUserChangeListener [NotificationPlugin] fail to run [user_attr_changed]
Traceback (most recent call last):
File "/opt/minarca/lib/python3.5/site-packages/rdiffweb/core/user.py", line 519, in _notify
getattr(listener, mod)(*args)
File "/opt/minarca/lib/python3.5/site-packages/rdiffweb/core/notification.py", line 167, in user_attr_changed
self.send_mail(userobj, _("Email address changed"), "email_changed.html")
File "/opt/minarca/lib/python3.5/site-packages/rdiffweb/core/notification.py", line 259, in send_mail
conn.sendmail(self._email_from, to_user.email, msg.as_string())
File "/usr/lib/python3.5/smtplib.py", line 876, in sendmail
raise SMTPRecipientsRefused(senderrs)
smtplib.SMTPRecipientsRefused: {'': (555, b'5.5.2 Syntax error. m9sm8252277qtp.27 - gsmtp')}
Email should not be send if the user doesn't have an email.
Edited by Patrik Dufresne