I'm new to this forum, and also a littel new to scripting in luna.
I have a Schneider HomeLynk with Wiser for KNX on. I'm trying some very simple thinks regarding sending Email. but I seams to have no luck getting ANY mail send what so ever.
I have now mad a new Gmail accound, and on that on enabled "allow acces for less secure apps" and changed nothing else than that on Gmail side
in script I have changed this to my new settings i common functions:
Code:
1234567891011121314
localsettings = {
-- "from" field, only e-mail must be specified herefrom = 'MYEMAIL@gmail.com',
-- smtp usernameuser = 'MYEMAIL@gmail.com',
-- smtp passwordpassword = 'MYCODE',
-- smtp serverserver = 'smtp.gmail.com',
-- smtp server portport = 465,
-- enable ssl, required for gmail smtpsecure = 'sslv23',
}
And in my triggered function i have this:
Code:
1234
-- make sure mail settings are set in user function library before using this functionsubject = 'There is new mail'message = 'Med Venlig Hilsen Kastaniely'mail('TEST@InoDes.dk', subject, message)
But nothing comes to my Emil, how do I debug that? and any good ideas what to do?
20.08.2020, 10:19 (This post was last modified: 20.08.2020, 10:23 by Tue.)
(20.08.2020, 10:04)Daniel. Wrote: Replace the whole email function as it sound as you were upgrading an old device and then old libraries are preserved.
POSTevnt(1) -- Kald funktion med event 1 (Post er kommet)
(20.08.2020, 10:19)Tue Wrote:
(20.08.2020, 10:04)Daniel. Wrote: Replace the whole email function as it sound as you were upgrading an old device and then old libraries are preserved.
-- make sure mail settings are set in user function library before using this functionsubject = 'Der er kommet post'message = 'Med Venlig Hilsen Kastaniely'res, err = mail('TSA@InoDes.dk', subject, message)
log(res, err)
--mail('TSA@InoDes.dk', subject, message)POSTevnt(1) -- Kald funktion med event 1 (Post er kommet)
(20.08.2020, 10:19)Tue Wrote:
(20.08.2020, 10:04)Daniel. Wrote: Replace the whole email function as it sound as you were upgrading an old device and then old libraries are preserved.
POSTevnt(1) -- Kald funktion med event 1 (Post er kommet)
(20.08.2020, 10:19)Tue Wrote:
(20.08.2020, 10:04)Daniel. Wrote: Replace the whole email function as it sound as you were upgrading an old device and then old libraries are preserved.
-- make sure mail settings are set in user function library before using this functionsubject = 'Der er kommet post'message = 'Med Venlig Hilsen Kastaniely'res, err = mail('TSA@InoDes.dk', subject, message)
log(res, err)
--mail('TSA@InoDes.dk', subject, message)POSTevnt(1) -- Kald funktion med event 1 (Post er kommet)
Is there anything else in system, I can check (It has newer been able to send Email, have tryeid many times to get it to work). Any port in my Network (IP) that has to be speciel or anything else on server that can block it?
(20.08.2020, 10:29)admin Wrote: "Try again" error usually means that DNS resolve failed for some reason. Check that you have valid DNS set in Network > Interfaces > eth0.
I am trying to send email with above code but not successed. The ping is ok from LM to for example www.google.com. I have enabled less secure apps on the gmail account.
I have tried both of sslv23 and tlsv1_2 for secure. The log as below.