Using GMAIL to send mail with the Mail Action 1.9.0.b5

mqtt working again after a new apt-get install and re-installing the binding.
Mail still not working correctly as it must have old authentication details in a cache somewhere as it continues to fail authentication on correct and current details. Re-starts and re-installs do not resolve the problem and I am reluctant to go through the whole rm thing again after what has happened.
It would be nice to have a clean and simple way to flush the cache as this seems to be an issue with the Mail-Action.
EDIT
It seems my problem may relate to permissions for /var/log/exim4. This probably stems from using tmpfs to mount /var/log so as to avoid regular SD card failures. I need to research this one to see if OH have a packaged solution or raise a new issue for it.
Mail still not working. Pity. I had great hopes for it.

With regards to your example I learned 2 things:

  • the from-parameter is mandatory. You must not omit it (like in your example)
  • Google notified me that it had blocked the access of processing the email due to an “insecure account access”.
    ** What needs to be done is to go the settings in your goofle Account and set “allow less secure apps” to ON (which is not recommended by Google).

Hope that helps someone who had similar issues like I did

1 Like

Hello,

hier is my Config

# The SMTP server hostname, e.g. "smtp.gmail.com"
hostname=smtp.gmail.com

# the SMTP port to use (optional, defaults to 25 (resp. 587 for TLS/SSL))
port=578

# the username and password if the SMTP server requires authentication
username=XXX@gmail.com
password=XXX

# The email address to use for sending mails
from=XXX@gmail.com

# set to "true", if STARTTLS is enabled (not required) for the connection
# (optional, defaults to false)
tls=true

# set to "true", if SSL negotiation should occur on connection
# do not use both tls=true and ssl=true
# (optional, defaults to false)
ssl=true

# set to "true", if POP before SMTP (another authentication mechanism)
# should be enabled. Username and Password are taken from the above
# configuration (optional, default to false)
popbeforesmtp=false

# Character set used to encode message body
# (optional, if not provided platform default is used)
#charset=

And very important to turn on this http://prntscr.com/m4dsgw security feature in Gmail on this url https://myaccount.google.com/lesssecureapps
Without it has not worked!