When openhab works on win7 is no problem to send one message when the item is on. But when openhab work on raspberry pi is when I press the button for one second to send 10 e-mail. And when a button is pressed 1 minute to have 100 email.
openhab.cfg
######################## Mail Action configuration ####################################
Firstly, I would suggest to post code as code as it’s a bit unreadable in your posting. Code within text can be marked with one Backtick (`) before and after and will show up like the word Backtick. For more lines of code, you can use 4 spaces in front of every line or (simpler) use 3 Backticks before and after code. these Backticks have to have it’s own line, no other Characters or space allowed.
################## Mail Action configuration
# 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=587
# the username and password if the SMTP server requires authentication
mail:username=email
mail:password=mypassword
# The email address to use for sending mails
mail:from=email@gmail.com
# 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 above
# configuration (optional, default to false)
# mail:popbeforesmtp=
# Character set used to encode message body
# (optional, if not provided platform default is used)
# mail:charset=
As you can see, it’s way more readable.
Now to your specific problem:
I can only guess why the behavior under windows is different to linux, but to be true, the linux behavior is, what I would have expected, as you are using the received update ON trigger. openHAB doesn’t differ between long and short press (at least for simple switches), so it would update the Item as long as you’re pressing the button.
Try changed to ON for trigger, this would only fire one time per switching, no matter how long you are pressing the button.
All loggings can be found at ./logs/openhab.log and ./logs/events.log, so there is no need to hardcopy your screen
When button is ON all the time sends email(per 1 sec 6x) . I depend, when button is ON send one email about the status change
Only what I see now in win7 is version org.openhab.action.mail-1.8.0 but on raspberry pi is version org.openhab.action.mail-1.8.1. This is different ??