SSL for email server access
Please merge this commit related to SSL support for accessing the email server. It seems that lot of ISPs block Port 25 to prevent spam. By using SSL on port 465 this can be circumvented. The Port 25 block leads to the error message
16:44:03.883 T:140152040003328 ERROR: File "/home/moritz/.kodi/addons/script.module.buggalo/lib/buggalo_client.py", line 192, in emailData 16:44:03.883 T:140152040003328 ERROR: smtp.sendmail(msg['From'], msg['To'], msg.as_string(9)) 16:44:03.883 T:140152040003328 ERROR: File "/usr/lib/python2.7/smtplib.py", line 750, in sendmail 16:44:03.884 T:140152040003328 ERROR: self.rset() 16:44:03.884 T:140152040003328 ERROR: File "/usr/lib/python2.7/smtplib.py", line 469, in rset 16:44:03.884 T:140152040003328 ERROR: return self.docmd("rset") 16:44:03.884 T:140152040003328 ERROR: File "/usr/lib/python2.7/smtplib.py", line 394, in docmd 16:44:03.884 T:140152040003328 ERROR: return self.getreply() 16:44:03.884 T:140152040003328 ERROR: File "/usr/lib/python2.7/smtplib.py", line 368, in getreply 16:44:03.884 T:140152040003328 ERROR: raise SMTPServerDisconnected("Connection unexpectedly closed")
The drawback is, that username and smtp password of the email account have to be saved unencrypted in the addon source code. This should therefore only be done with email accounts such as gmail, which have separate login and smtp passwords. I think it is best to have different email accounts for every addon or addon developer and not use one email account for all buggalo emails.
I based this branch on zbynas fork, since his changes already include a fix to the email sender. So it would be better to merge his branch first.
Since there was no activity on this repo for over one year, I merged this issue together with PR https://github.com/twinther/script.module.buggalo/pull/5 to the official repo in PR https://github.com/xbmc/repo-scripts/pull/719. I will continue the development of this addon in my fork