E-Mail verschicken (SendMail) geht nicht
Verfasst: 31. Mär 2018 20:23
Hallo Leute,
auch auf die Gefahr hin, dass ich mich hier lächerlich mache aber ich bekommes es einfach nicht hin und frage daher mal in diesem Forum.
Ich möchte eine E-Mail per Regel verschicken.
Was habe ich gemacht:
Ich habe üer UI die Mail Action im Paper UI installiert (Add On und dann auf Actions)
dann habe ich die "mail.cfg" so eingerichtet:
######################## Mail Action configuration ####################################
#
# 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))
port=587
# the username and password if the SMTP server requires authentication
username=xxxxxx.xxxx@gmail.com
password=xxxxxxxxx
# The email address to use for sending mails
from=xxxxxxxxx@gmail.com
# set to "true", if TLS should be used for the connection
# (optional, defaults to false)
tls=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
Somit sollte OH2 in der Lage sein, eine E-Mail zu verschicken.
Ich möchte jetzt eine Mail bekommen, wenn mein Handy nicht mehr im W-LAN der Fritz Box vorhanden ist.
Folgende Regel habe ich eingerstellt und unter "rules abgespeichert
rule "Markus ist ausser Haus - E-Mail"
when
Item MarkusiphoneXOnline changed from OPEN to CLOSED
then
postUpdate(vMarkusAusserHaus, ON)
sendMail("xxxxx.xxxxx@gmail.com", "This is the email subject", "This is the email body")
end
Ich habe dann noch eine SideMap programmiert, die einen Schalter auf ON setzt, wenn das Handy nicht im WLAN ist.
Das funktioniert ohne Probleme, der Schalter geht auf ON / OFF, wenn ich entsprechend das Handy aus dem WLAN nehme.
Auch im Log File sehe ich die entsprechenden Auslöser:
2018-03-31 19:48:51.360 [vent.ItemStateChangedEvent] - MarkusiphoneXOnline changed from OPEN to CLOSED
Laut Regel soll jetzt auch eine E-Mail verscickt werden, dieses wird aber nicht verschickt.
Ich habe auch im Spam Ordern geschaut, keine E-Mail
Ich suche seit Tagen im Internet nach der Lösung, ich finde keine Antwort.
Muss ich im Openhab noch mehr einstellen / aktivieren, damit der Mailservice funktioniert?
Vielen Dank schon mal für Eure Hilfe
Gruß
Markus
auch auf die Gefahr hin, dass ich mich hier lächerlich mache aber ich bekommes es einfach nicht hin und frage daher mal in diesem Forum.
Ich möchte eine E-Mail per Regel verschicken.
Was habe ich gemacht:
Ich habe üer UI die Mail Action im Paper UI installiert (Add On und dann auf Actions)
dann habe ich die "mail.cfg" so eingerichtet:
######################## Mail Action configuration ####################################
#
# 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))
port=587
# the username and password if the SMTP server requires authentication
username=xxxxxx.xxxx@gmail.com
password=xxxxxxxxx
# The email address to use for sending mails
from=xxxxxxxxx@gmail.com
# set to "true", if TLS should be used for the connection
# (optional, defaults to false)
tls=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
Somit sollte OH2 in der Lage sein, eine E-Mail zu verschicken.
Ich möchte jetzt eine Mail bekommen, wenn mein Handy nicht mehr im W-LAN der Fritz Box vorhanden ist.
Folgende Regel habe ich eingerstellt und unter "rules abgespeichert
rule "Markus ist ausser Haus - E-Mail"
when
Item MarkusiphoneXOnline changed from OPEN to CLOSED
then
postUpdate(vMarkusAusserHaus, ON)
sendMail("xxxxx.xxxxx@gmail.com", "This is the email subject", "This is the email body")
end
Ich habe dann noch eine SideMap programmiert, die einen Schalter auf ON setzt, wenn das Handy nicht im WLAN ist.
Das funktioniert ohne Probleme, der Schalter geht auf ON / OFF, wenn ich entsprechend das Handy aus dem WLAN nehme.
Auch im Log File sehe ich die entsprechenden Auslöser:
2018-03-31 19:48:51.360 [vent.ItemStateChangedEvent] - MarkusiphoneXOnline changed from OPEN to CLOSED
Laut Regel soll jetzt auch eine E-Mail verscickt werden, dieses wird aber nicht verschickt.
Ich habe auch im Spam Ordern geschaut, keine E-Mail
Ich suche seit Tagen im Internet nach der Lösung, ich finde keine Antwort.
Muss ich im Openhab noch mehr einstellen / aktivieren, damit der Mailservice funktioniert?
Vielen Dank schon mal für Eure Hilfe
Gruß
Markus