Hallo,
Ich habe ebenfalls ein Problem mit dem automatischen Mailversand. Ich schaffe es nicht, dass OH eine Mail versendet.
Ich betreibe OH auf einem Raspi 3. Die Action Mail habe ich installiert. Ich arbeite mit GMX Mail
In der mail.cfg habe ich folgende Einstellungen:
Code: Alles auswählen
# The SMTP server hostname, e.g. "smtp.gmail.com"
hostname=mail.gmx.net
# the SMTP port to use (optional, defaults to 25 (resp. 587 for TLS/SSL))
port=587
# the username and password if the SMTP server requires authentication
username=xxxxxxx@gmx.de
password=yyyyyyy
# The email address to use for sending mails
from=xxxxxxx@gmx.de
# set to "true", if STARTTLS is enabled (not required) for the connection
# (optional, defaults to false)
#tls=false
# 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=
# Character set used to encode message body
# (optional, if not provided platform default is used)
#charset=
Zum Testen habe ich folgende Regel eingegeben
Code: Alles auswählen
rule "Mailversand"
when
Item Sonoff_P1_Schalter changed
then
sendMail("xxxxxxxx@gmx.de", "Testmail", "Nur zum testen")
end
Wenn ich nun den Schalter betätige, tut sich einfach gar nix.
Ich Logfile bekomme ich folgende Infos mit denen ich leider nichts anfangen kann.
Code: Alles auswählen
Caused by: java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:?]
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[?:?]
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[?:?]
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[?:?]
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:?]
at java.net.Socket.connect(Socket.java:589) ~[?:?]
at java.net.Socket.connect(Socket.java:538) ~[?:?]
at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:288) ~[27:javax.mail:1.4.4]
at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:231) ~[27:javax.mail:1.4.4]
at com.sun.mail.pop3.Protocol.<init>(Protocol.java:107) ~[27:javax.mail:1.4.4]
at com.sun.mail.pop3.POP3Store.getPort(POP3Store.java:261) ~[27:javax.mail:1.4.4]
at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:206) ~[27:javax.mail:1.4.4]
at javax.mail.Service.connect(Service.java:295) ~[27:javax.mail:1.4.4]
at javax.mail.Service.connect(Service.java:176) ~[27:javax.mail:1.4.4]
at org.apache.commons.mail.Email.buildMimeMessage(Email.java:1388) ~[?:?]
Ich hoffe, es kann mir jemand weiterhelfen.
LG Konrad