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.

E-mail with attachment
#17
Something like below:
Code:
-- Download an image from camera
require('socket.http')
image = socket.http.request('http://192.168.2.10/cgi-bin/snapshot.cgi?chn=1&u=admin&p=password')

to = 'example@gmail.com'
subject = 'Snapshot from camera'
message = 'This is the message from your LM with the snapshot from camera.'
files = {{filename='Snapshot.jpg', filedata=image, mimetype='jpg'}}

-- Send an email
mailattach(to, subject, message, files)
Reply


Messages In This Thread
E-mail with attachment - by admin - 21.09.2016, 06:34
RE: E-mail with attachment - by buuuudzik - 11.03.2017, 07:29
RE: E-mail with attachment - by buuuudzik - 15.03.2017, 09:35
RE: E-mail with attachment - by admin - 15.03.2017, 10:46
RE: E-mail with attachment - by buuuudzik - 15.03.2017, 11:00
RE: E-mail with attachment - by admin - 15.03.2017, 11:06
RE: E-mail with attachment - by buuuudzik - 15.03.2017, 11:12
RE: E-mail with attachment - by Keitz - 22.10.2017, 18:11
RE: E-mail with attachment - by buuuudzik - 17.03.2017, 16:59
RE: E-mail with attachment - by buuuudzik - 22.10.2017, 18:24
RE: E-mail with attachment - by iJAF - 06.04.2022, 17:31
RE: E-mail with attachment - by admin - 11.04.2022, 09:44

Forum Jump: