LarsMichelsen / pmatic

Python API for Homematic. Easy to use.
https://larsmichelsen.github.io/pmatic/
GNU General Public License v2.0
34 stars 23 forks source link

smtplib missing on CCU #8

Closed jschmer closed 8 years ago

jschmer commented 8 years ago

I'd like to send basic emails with smtplib that comes bundled with python.

This module does not exist on the current CCU installation. Is there another method to send emails that are already bundled on the CCU python installation?

LarsMichelsen commented 8 years ago

Not yet, but it is a good idea to make this possible. Additional Python modules can be integrated easily.

In general on Linux systems I tend to use sendmail together with the local MTA to send out mails. This way it is not needed to configure the mail settings for each application individually.

As far as I see there is no such configuration on the CCU. So seems to be equal which way to go on the first view. When executing pmatic on another Linux system it might come in handy to use sendmail. But from the portability point of view it seems to be good to use a pure Python mechanism.

LarsMichelsen commented 8 years ago

Just added this library. It would be really nice to have a EMail() notify class in pmatic/notify.py with an API equal to the Pushover() class.

jschmer commented 8 years ago

Looks like a module dependency for the MIME modules is still missing:

  File "/usr/local/etc/config/addons/pmatic/scripts/SendEMail.py", line 6, in SendEMail
    from email.mime.text import MIMEText
  File "/usr/local/etc/config/addons/pmatic/python/lib/python2.7/email/mime/text.py", line 10, in <module>
    from email.mime.nonmultipart import MIMENonMultipart
  File "/usr/local/etc/config/addons/pmatic/python/lib/python2.7/email/mime/nonmultipart.py", line 10, in <module>
    from email.mime.base import MIMEBase
  File "/usr/local/etc/config/addons/pmatic/python/lib/python2.7/email/mime/base.py", line 9, in <module>
    from email import message
  File "/usr/local/etc/config/addons/pmatic/python/lib/python2.7/email/message.py", line 10, in <module>
    import uu
ImportError: No module named uu