This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

mail function does not work for me
#1
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.
Reply


Messages In This Thread
mail function does not work for me - by Hyxion14 - 15.03.2020, 12:21

Forum Jump: