10.10.2017, 12:00
Hi
our smtp server needs to enable tls. what is the right parameter for secure?
txs
our smtp server needs to enable tls. what is the right parameter for secure?
txs
email setting
|
10.10.2017, 12:00
Hi
our smtp server needs to enable tls. what is the right parameter for secure? txs
10.10.2017, 12:24
Put tlsv12 there, but in most cases port 587 uses STARTTLS mode, so you need to install updated LuaSocket package. Which hardware are you using?
10.10.2017, 19:16
(10.10.2017, 12:24)admin Wrote: Put tlsv12 there, but in most cases port 587 uses STARTTLS mode, so you need to install updated LuaSocket package. Which hardware are you using? I have 1 LM4 and 1 LM5 with last firmware and with luashocket 2.0.2-17 both. My smtp server setting are So do i need to install LuaSocket package?
11.10.2017, 07:59
Update package from System config-> System > Packages > Click (+) icon
Package for LM4: https://dl.openrb.com/lm-17/pkg/luasocke...23_mxs.ipk Package for LM5: https://dl.openrb.com/lm-17-imx6/pkg/lua...3_imx6.ipk First try with secure = 'starttls', If it does not work then try secure = 'tlsv12', In your script put mail function call inside log( ) so you can see an error message in logs if there is any.
11.10.2017, 08:51
(11.10.2017, 07:59)admin Wrote: Update package from System config-> System > Packages > Click (+) icon hi with secure = 'starttls' email() returns * arg: 1 * nil * arg: 2 * nil and with secure = 'tlsv12' * arg: 1 * nil * arg: 2 * string: closed
11.10.2017, 10:27
Can you send login/password that your are using via PM so I can check it locally?
13.10.2017, 08:12
13.10.2017, 08:45
Thanks, please update packages again:
Package for LM4: https://dl.openrb.com/lm-17/pkg/luasocke...23_mxs.ipk Package for LM5: https://dl.openrb.com/lm-17-imx6/pkg/lua...3_imx6.ipk Replace mail() function in Common functions with this and change from/user/password field values to your access details: Code: function mail(to, subject, message)
13.10.2017, 09:06
(13.10.2017, 08:45)admin Wrote: Thanks, please update packages again: it works perfect. Thank you very much Can you send me the package for LogicMachine5 Lite Power?
13.10.2017, 10:02
It's already there:
https://dl.openrb.com/lm-17-imx6/pkg/lua...3_imx6.ipk
17.11.2017, 18:43
Hi,
Do I need LuaSocket package for HomelYnk also? Where can I find it? Can I use the same user script with my u/p server settings? Best,
18.11.2017, 11:45
Hi again,
Just wanted to share that I found a solution for my question form this link: https://www.schneider-electric.com/en/do.../AN011_SL/ Best,
21.11.2017, 14:36
Hi all,
Can you help me to find the mistake in my script ? Thanks function Email(to, subject, message) -- make sure these settings are correct ---------------BEGINNING OF USER EDITABLE AREA------------------- local settings = { -- "from" field, only e-mail must be specified here from = 'bouvet.clementine@gmail.com', -- smtp username user = 'bouvet.clementine@gmail.com', -- smtp password password = 'xxxxx', -- smtp server server = 'smtp.gmail.com', -- smtp server port port = 465, -- enable ssl, required for gmail smtp secure = 'sslv23', } -------------------END OF USER EDITABLE AREA--------------------- local smtp = require('socket.smtp') local escape = function(v) return '<' .. tostring(v) .. '>' end -- message headers and body settings.source = smtp.message({ headers = { to = escape(to), subject = subject, }, body = message }) -- fixup from field settings.from = escape(settings.from) settings.rcpt = { escape(to) } return smtp.send(settings) end
22.11.2017, 13:00
There's no point in using another function, you can just use mail(to, subject, message) from common functions. You should also wrap mail function call with log(mail(...)) to see the mail server response which might contain an error of some sort.
27.03.2024, 09:27
Hi,
What is wrong ? Code: -- user function library
27.03.2024, 09:29
Log what the mail function returns as suggested here: https://forum.logicmachine.net/showthrea...1#pid33911
27.03.2024, 09:47
(27.03.2024, 09:29)admin Wrote: Log what the mail function returns as suggested here: https://forum.logicmachine.net/showthrea...1#pid33911 initscript 27.03.2024 09:44:38 * arg: 1 * nil * arg: 2 * string: timeout to: server = 'smtp.office365.com', -- smtp server port port = 587, -- enable tls secure = 'tlsv1_3', -- use STARTTLS mode starttls = true,
27.03.2024, 09:50
------------------------------
Ctrl+F5
09.05.2024, 10:34
(27.03.2024, 09:47)joaodaniel.pereira Wrote:(27.03.2024, 09:29)admin Wrote: Log what the mail function returns as suggested here: https://forum.logicmachine.net/showthrea...1#pid33911 Hi, Did you managed to find the correct settings? I'm also trying to send an email via the same smtp server :-) and getting the following error: * arg: 1 * number: 1 * arg: 2 * nil Thanks! Niels
09.05.2024, 10:36
What you are getting is not an error but a normal result: first return value is 1 = ok, second is nil = no error.
|
« Next Oldest | Next Newest »
|