Logic Machine Forum
email setting - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: email setting (/showthread.php?tid=1036)

Pages: 1 2


RE: email setting - Supersoon - 09.05.2024

(09.05.2024, 10:36)admin Wrote: What you are getting is not an error but a normal result: first return value is 1 = ok, second is nil = no error.

Hi,

Thanks. I'm not receiving the email though. See settings below. For the 'from' and 'user' field I'm using the same email adres together with the correct password, verified on "https://outlook.office.com/"

Code:
-- send an e-mail
function mail(to, subject, message)
  -- make sure these settings are correct
  local settings = {
    -- "from" field, only e-mail must be specified here
    from = 'xxxxxxxxxxxxxxxxxxxxxx',
    -- smtp username
    user = 'xxxxxxxxxxxxxxxxxxxxxx',
    -- smtp password
    password = ' xxxxxxxxxxxxxxxxxxxxxx',
    -- smtp server smtp-mail.outlook.com / smtp.office365.com
    server = 'smtp.office365.com',
    -- smtp server port
    port = 587,
     -- enable tls
    secure = 'ttlsv1_3',
    -- use STARTTLS mode
    starttls = true,
  }

When using the following log code I'm getting the message below.

Code:
res, err = mail(to, subject, message)

if not res then
  log(err)
end


* string: 535 5.7.139 Authentication unsuccessful, the request did not meet the criteria to be authenticated successfully. Contact your administrator. [LO4P123CA0481.GBRP123.PROD.OUTLOOK.COM 2024-05-09T10:33:51.352Z 08DC6E1D1ACB6079]

Is there any documentation with common tested SMTP servers? 

Thanks in advance,

Niels


RE: email setting - admin - 09.05.2024

Check this: https://learn.microsoft.com/en-us/answers/questions/512954/535-5-7-139-authentication-unsuccessful


RE: email setting - Supersoon - 24.05.2024

(09.05.2024, 10:55)admin Wrote: Check this: https://learn.microsoft.com/en-us/answers/questions/512954/535-5-7-139-authentication-unsuccessful

Thanks for your help. I'm not the maibox administrator so I created a gmail adress instead.  Rolleyes

Regards,

Niels