15.03.2020, 12:21
Hello, I am trying to use the mail function, but it doesn't work for me.
This is the function setting:
function mail(to, subject, message)
-- make sure these settings are correct
local settings = {
-- "from" field, only e-mail must be specified here
from = 'LM-ANA@x-domotica.com',
-- smtp username
user = 'LM-ANA@x-domotica.com',
-- smtp password
password = '................',
-- smtp server
server = 'mail.x-domotica.com',
-- smtp server port
port = 587,
-- enable tls, required for gmail smtp
secure = 'none',
starttls = false,
}
Nor does it record anything in Log.
The only message I have is in the error log and it says:
Library socket / tp: 0: attempt to index a nil value
stack traceback:
[C]: in function 'mail'
User script: 8: in main chunk
Why dont work?
Thanks very much for your help.
This is the function setting:
function mail(to, subject, message)
-- make sure these settings are correct
local settings = {
-- "from" field, only e-mail must be specified here
from = 'LM-ANA@x-domotica.com',
-- smtp username
user = 'LM-ANA@x-domotica.com',
-- smtp password
password = '................',
-- smtp server
server = 'mail.x-domotica.com',
-- smtp server port
port = 587,
-- enable tls, required for gmail smtp
secure = 'none',
starttls = false,
}
Nor does it record anything in Log.
The only message I have is in the error log and it says:
Library socket / tp: 0: attempt to index a nil value
stack traceback:
[C]: in function 'mail'
User script: 8: in main chunk
Why dont work?
Thanks very much for your help.