Hi Everyone!
I want to try and send an gmail email to myself as an automation.
As such i placed the following under the notify section at the configurtion.yml and checked the confugrtion which turned to be just fine.
name: sendemail
platform: smtp
server: smtp.gmail.com
port: 587
timeout: 15
sender: [email protected]
starttls: true
username: [email protected]
password: password
recipient:
- [email protected]
sender_name: Home Assistant
However after restarting HA to try the notify the following errors apeared at the HA logger:
2018-06-25 19:10:10 ERROR (MainThread) [homeassistant.components.notify] Error setting up platform smtp
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/notify/init.py”, line 95, in async_setup_platform
platform.get_service, hass, p_config, discovery_info)
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/notify/smtp.py”, line 75, in get_service
if mail_service.connection_is_valid():
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/notify/smtp.py”, line 120, in connection_is_valid
server = self.connect()
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/notify/smtp.py”, line 106, in connect
self._server, self._port, timeout=self._timeout)
File “/usr/local/lib/python3.6/smtplib.py”, line 251, in init
(code, msg) = self.connect(host, port)
File “/usr/local/lib/python3.6/smtplib.py”, line 336, in connect
self.sock = self._get_socket(host, port, self.timeout)
File “/usr/local/lib/python3.6/smtplib.py”, line 307, in _get_socket
self.source_address)
File “/usr/local/lib/python3.6/socket.py”, line 724, in create_connection
raise err
File “/usr/local/lib/python3.6/socket.py”, line 713, in create_connection
sock.connect(sa)
OSError: [Errno 99] Cannot assign requested address
Anyone has a clue what am i doing wrong or to debug and solve the problem?
Some Info
HA version: 0.72
Platform: HA on a RSP3
DNS:
nslookup smtp.gmail.com
Server: 8.8.4.4
Address: 8.8.4.4#53
Non-authoritative answer:
smtp.gmail.com canonical name = gmail-smtp-msa.l.google.com.
Name: gmail-smtp-msa.l.google.com
Address: 64.233.166.108
Name: gmail-smtp-msa.l.google.com
Address: 64.233.166.109
Thanks in advance for any suggestion!!!