Send email on openhab 1 not working

Hi All,

Trying to get openhab to email me with no success,openhab 1 running on raspberry pi.

In rules I have …

rule “On System Startup"
when
System started
then
sendMail(“xxxxx@pemail.co.za”, “Test”, “This is the message.”)
end

In openhab config file I have …

mail:hostname=smtp.gmail.com

mail:port=587

mail:username=xxxxxx@gmail.com
mail:password=xxxxxx

mail:from=xxxxxxx@gmail.com

mail:tls=true

remaining options left as default

Have enabled access for less secure devices in gmail settings.

In openhab log I see …

2018-05-22 19:12:41.500 [DEBUG] [.a.mail.internal.MailActivator] - Mail action has been started.

Nothing mail related shows in event log

action.mail-1.8.3 jar is in addons folder,have replaced this file in case original file was corrupted.

Any idea why mail not being sent ?

Cheers Dave

OK,have figured out my openhab.cfg file is good.
however when adding …
rule “On System Startup"
when
System started
then
sendMail(“xxxxx@pemail.co.za”, “Test”, “This is the message.”)
end

at the top of my rules file,it breaks the existing rules that worked before and when adding the system startup rule at the bottom of my rules file it does not get triggered.

Can anyone explain why my working rules stop working and why does the system startup rule not get triggered if not at the top of the rules file ?

Below is my original rules that work ,

rule “car presence”
when
Item itm_park_dist_mqtt received update
then
if (itm_park_dist_mqtt.state < 30)
{
sendCommand(itm_park_car_present, 1)
}
if (itm_park_dist_mqtt.state > 35)
{
sendCommand(itm_park_car_present, 0)
}
end

rule “toggle workshop alarm”

when

Item Wshop_Alarm received update

then

if (Wshop_Alarm.state == ON) {

Thread::sleep(300)

sendCommand(Wshop_Alarm, OFF)

}

end

Thanks

No one have any explanation for this ?