Hi Kyle,
I have been trying to get email alerts sending in my conditional statements. The best I have been able to get is to receive the test email. I have used a Gmail account with the “less secure app access” turned on for both the sending and receiving addresses. Since attempting to try protocols other than SSL, I have not been able to receive even the test email.
My conditional scripts run all other actions except email alerts and I am sure I have used the correct password. Please could you point me where to look to solve the issue?
host: smtp.gmail.com
port: 465
protocol: SSL
logs:
2021-08-16 15:20:54,746 - ERROR - mycodo.outputs.on_off_gpio_835c6bbd - Status check error: None
2021-08-16 15:20:54,748 - INFO - mycodo.function.bang_bang_on_off_6d2127aa - Input: 24.0, output_raise: None, output_lower: None, target: 24.0, hyst: 2.0
2021-08-16 15:20:57,696 - ERROR - mycodo.notification - Could not send email to [’********@gmail.com’] with subject None
Traceback (most recent call last):
File “/var/mycodo-root/mycodo/utils/send_data.py”, line 109, in send_email
server = smtplib.SMTP_SSL(smtp_host, port)
File “/usr/lib/python3.7/smtplib.py”, line 1031, in init
source_address)
File “/usr/lib/python3.7/smtplib.py”, line 251, in init
(code, msg) = self.connect(host, port)
File “/usr/lib/python3.7/smtplib.py”, line 336, in connect
self.sock = self._get_socket(host, port, self.timeout)
File “/usr/lib/python3.7/smtplib.py”, line 1037, in _get_socket
self.source_address)
File “/usr/lib/python3.7/socket.py”, line 707, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File “/usr/lib/python3.7/socket.py”, line 748, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution
2021-08-16 15:20:59,806 - ERROR - mycodo.daemon - Could not query output state: None
Traceback (most recent call last):
File “/var/mycodo-root/mycodo/mycodo_daemon.py”, line 849, in output_state
return self.controller[‘Output’].output_state(output_id, output_channel)
File “/var/mycodo-root/mycodo/controllers/controller_output.py”, line 320, in output_state
return self.output[output_id].output_state(output_channel)
KeyError: None
Thanks!