-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
SMTP does not seem to work with Gmail #304
Comments
From [email protected] on May 16, 2013 13:37:55 Title should be "SMTP does not seem to work with Gmail" instead of "SMPT does not seem to work with Gmail". My apologies... |
From teichsta on May 16, 2013 22:07:21 changed title Summary: SMTP does not seem to work with Gmail (was: SMPT does not seem to work with Gmail) |
From [email protected] on May 17, 2013 09:48:03 My guess is that is something related with Apache. The code in 'openhab.io.net.actions.Mail.java' seems OK. I tried with a local server without authentication (port 25) and it did not work. In fact the exception is thrown at line 132 of 'openhab.io.net.actions.Mail.java', where the SimpleMail.send() method is invoked. I use Java 1.7.0_21-b11. Any thoughts? |
From [email protected] on May 20, 2013 06:22:42 It works for me with the same configuration |
From [email protected] on May 20, 2013 06:32:07 I think it may be related with Apache configuration or with some kind of environment variable, but I have no clue at all of which one... Did this happen to anyone else? |
From kai.openhab on May 20, 2013 12:12:31 I am also successfully using the mail action since a long time (but not with gmail) and have no problems whatsoever with it... |
From [email protected] on May 30, 2013 02:32:06 I also have gmail functional with the config above - BUT, I'm using Linux. |
From [email protected] on May 30, 2013 06:57:34 This is the result I get, in debug mode, when using mail:hostname=smtp.gmail.com 15:49:26.963 DEBUG o.o.m.r.i.engine.RuleEngine[:277] - Executing startup rule 'SMTP'
mail:hostname=smtp.gmail.com the result is: 15:52:48.450 DEBUG o.o.m.r.i.engine.RuleEngine[:277] - Executing startup rule 'SMTP'
And with: mail:hostname=smtp.gmail.com the result is: 15:55:13.565 DEBUG o.o.m.r.i.engine.RuleEngine[:277] - Executing startup rule 'SMTP'
|
From [email protected] on May 30, 2013 06:57:34 ....interpreter.impl.XbaseInterpreter.invokeOperation(XbaseInterpreter.java:729) |
From [email protected] on May 30, 2013 08:44:58 What about |
From [email protected] on May 30, 2013 08:56:06 I tried that also, but it does not work... This is what I get with mail:hostname=smtp.gmail.com 17:51:32.328 ERROR o.openhab.io.net.actions.Mail[:136] - Could not send e-mail to '[email protected]æ. This is what I get with mail:hostname=smtp.gmail.com 17:53:34.637 ERROR o.openhab.io.net.actions.Mail[:136] - Could not send e-mail to '[email protected]æ. |
From teichsta on July 12, 2013 08:18:37 does the problem still occur? |
From [email protected] on July 12, 2013 08:37:51 Yes, indeed. |
From teichsta on July 13, 2013 13:38:42 i managed to send email from my MacOS system with to following properties: mail:hostname=smtp.gmail.com Can you confirm that they work for you as well? ( http://stackoverflow.com/questions/848794/sending-email-in-java-using-apache-commons-email-libs gave a hint). Regards, Thomas E.-E. |
From teichsta on August 13, 2013 09:11:49 any news? |
From [email protected] on August 16, 2013 07:17:54 No, I've just lost all hope in getting it working... |
From [email protected] on September 28, 2013 14:04:31 Anyone has succesfully sent an e-mail using OpenHAB in Windows 7? |
From [email protected] on September 28, 2013 14:07:23 I am starting to think that the problem is the OS... |
From kai.openhab on September 28, 2013 20:44:15 As we are doing nothing particular, but simply using Apache commons-email, you might want to check on the web if there are any known issues regarding this library on Windows 7. |
From [email protected] on October 07, 2013 07:44:52 I hope this can help. OS: OpenHAB 1.4.0-SNAPSHOT:
|
From [email protected] on October 07, 2013 12:38:12 I had one glitch afterwards (probably lost my connection for a minute), but it keeps on working now. |
From [email protected] on October 08, 2013 00:07:43 Am I supposed to set up or reinstall Apache, or is this something that OpenHAB does? |
From [email protected] on October 08, 2013 01:11:00 Hi, Have you tried using another gmail account? Here are my findings to the other configs you posted: When I try to send email using: I get an error Connection timed out. Using: Gives me a port out of range error, I don't like pop so I would set that to false... When trying with: This takes too long to wait for the time-out ;-) So the only working configuration for me is: Did you download the openhab-runtime.zip, unpack that and run start.bat? The error you get: Server doesn't support required transport level secu I have another gmail account with two-factor auth, using this account I get : Try using a 'clean' gmail account... |
From teichsta on November 05, 2013 14:47:54 Labels: To-Github |
Does this issue still apply? |
since nobody else reported this issue currently i will close this issue. Please feel free to reopen it if this issue still apply. Best, Thomas E.-E. |
Please reopen, same here. [system] [openhab.cfg] [rules] [openhab.log] |
Appears to be working fine here. Sample debug output below, but email is successfully received in my gmail account. Probably redundant advice, but double check your credentials in openhab.cfg...
|
There's definitely something going on here, but I couldn't tell you why. I went and captured the connection to/from my (private) non-TLS mail server. Openhab sends a HELO but then also sends QUIT for some reason! dump generated by running on openhab host (assuming it only has one network port): sudo tcpdump -host (your mail server) -vvXS -w tcpdump_capture_file.cap then dragging tcpdump_capture_file.cap into wireshark to examine. I'm no SMTP expert, but wireshark says that openhab is sending three commands in packet 7: EHLO When the remote side sees the quit message, it honors the quit request, says bye and closes the connection. (If I manually telnet in, type HELO BLAH, QUIT sure enough it closes the connection.) Seems as though there's either a missing payload between HELO and QUIT, or sending QUIT is premature. tcpdump capture file available here, since github insists this isn't a zip file (it is): http://www.thekorn.net/temp/tcpdump_capture_file.zip |
For reference, here are the mail settings I'm using: mail:hostname=mail.thekorn.net |
I have had gmail sending working previously but now I get the same error as above since 2016-02-23. to me I have since beginning of March upgraded openhab from 1.8.0 to 1.8.2 and moved my openhab installation to a Raspberry PI3 with latest Jessie. I was previously running on a PI2, but this error seems to have started on 2016-02-23 according to logs in my old PI2: 2016-02-23 19:02:15.868 [ERROR] [nhab.action.mail.internal.Mail] - Could not send e-mail to '[email protected]'. A recent log on my PI3 looks like this: 2016-04-03 23:08:02.842 [ERROR] [nhab.action.mail.internal.Mail] - Could not send e-mail to '[email protected]'. gmail action settings: The SMTP server hostname, e.g. "smtp.gmail.com"mail:hostname=smtp.gmail.com the SMTP port to use (optional, defaults to 25 (resp. 587 for TLS))##mail:port= the username and password if the SMTP server requires authenticationmail:username=[email protected] The email address to use for sending mailsmail:from=[email protected] set to "true", if TLS should be used for the connection(optional, defaults to false)mail:tls=true set to "true", if POP before SMTP (another authentication mechanism)should be enabled. Username and Password are taken from the aboveconfiguration (optional, default to false)##mail:popbeforesmtp= Character set used to encode message body(optional, if not provided platform default is used)##mail:charset= When configuring this for the first time I had to change my security settings in my gmail account to allow for less secure apps to connect to my gmail account: Could it be problems on the gmail side that causes this? BR, /Janne |
Could this be similar to what is described here? Please continue discussion there as there are few who would read this issue, and it can likely be resolved there. |
From [email protected] on May 16, 2013 22:35:55
What steps will reproduce the problem? 1. Configure openhab.cfg to use SMTP:
mail:hostname=smtp.gmail.com
mail:port=587
mail:username=youruser
mail:password=yourpassword
mail:from=[email protected]
mail:tls=true
rule "E-mail"
when
System started
then
sendMail("[email protected]","Test e-mail","Test e-mail")
end
What is the expected output?
To get an e-mail
What do you see instead?
The rule is launched, but the mail fails to send.
I get a message saying "Send failure" What version of the product are you using? On what operating system? OpenHAB 1.2.0
Windows 7 Please provide any additional information below. I tried all possible combinations of ports 25, 587 and 465, with and without TLS. The failure message changes but it nevers sends the e-mail.
I doubled checked user and password.
I tried different gmail accounts with the same results.
I even tried with hotmail (smtp.live.com), with the same results...
I tried two different PCs with Windows 7.
I just don't know what else to try.
Please help.
Thanks in advance
Original issue: http://code.google.com/p/openhab/issues/detail?id=304
The text was updated successfully, but these errors were encountered: