<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title>Форум QUIK [тема: Quik - чтение почты]</title>
		<link>http://forum.quik.ru</link>
		<description>Новое в теме Quik - чтение почты форума  на сайте Форум QUIK [forum.quik.ru]</description>
		<language>ru</language>
		<docs>http://backend.userland.com/rss2</docs>
		<pubDate>Sat, 23 May 2026 22:03:22 +0300</pubDate>
		<item>
			<title>Quik - чтение почты</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message60362/topic6739/">Quik - чтение почты</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Как то у меня так ничего с почтой и не получилось. <br />
			<i>17.12.2021 15:40:58, Иван.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message60362/topic6739/</link>
			<guid>http://forum.quik.ru/messages/forum10/message60362/topic6739/</guid>
			<pubDate>Fri, 17 Dec 2021 15:40:58 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Quik - чтение почты</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message59954/topic6739/">Quik - чтение почты</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Сокет смог запустить прочитав этот пост <noindex><a href="https://smart-lab.ru/blog/401675.php" target="_blank" rel="nofollow">https://smart-lab.ru/blog/401675.php</a></noindex><br />1) установил программу<br />2) закинул две папки mime &amp; socket в LuaIndicators<br />3) подключил в скрипте<br /><br />require(&quot;socket&quot;);<br />http = require(&quot;socket.http&quot;);<br /><br />Выполнил запрос<br /><br />-- QUIK Выполнить http - запрос<br />function _QuikGetHttp()<br /> &nbsp; content, status, header = socket.http.request(HTTP_URL);<br /> &nbsp; return content;<br />end;<br /><br />Но все равно не пойму как дальше быть с почтой? <br />
			<i>01.12.2021 15:39:30, Иван.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message59954/topic6739/</link>
			<guid>http://forum.quik.ru/messages/forum10/message59954/topic6739/</guid>
			<pubDate>Wed, 01 Dec 2021 15:39:30 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Quik - чтение почты</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message59952/topic6739/">Quik - чтение почты</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			<br />====quote====<br /><a class="blog-p-user-name" id="bp_seoIJJ5X" href="/user/3132/" bx-tooltip-user-id="3132">Nikolay</a> написал:<br /> <br />====quote====<br /><noindex><a href="/user/13936/" target="_blank" rel="nofollow">Иван</a></noindex> написал:<br />Спасибо за развернутый ответ.<br />Можно пример с вашей консольной программы.<br />=============<br /> Она написана на C#. Я её ещё не выкладывал в открытый доступ.<br /><br />Но, все можно найти в примерах MailKit: &nbsp;<noindex><a href="https://github.com/jstedfast/MailKit" target="_blank" rel="nofollow">https://github.com/jstedfast/MailKit</a></noindex> <br />=============<br />Уже и туда и сюда попробовал положить эти библиотеки.<br />Но QUIK все равно их не находит... Не пойму что могу делать не правиьно?
====code====
<pre>...&#92;QUIK_2&#92;LuaIndicators&#92;Git&#92;EnterTrade.lua:64: module 'socket' not found:
&nbsp;&nbsp;&nbsp;no field package.preload&#91;'socket'&#93;
&nbsp;&nbsp;&nbsp;no file '.&#92;socket.lua'
&nbsp;&nbsp;&nbsp;no file 'C:&#92;QUIK_2&#92;lua&#92;socket.lua'
&nbsp;&nbsp;&nbsp;no file 'C:&#92;QUIK_2&#92;lua&#92;socket&#92;init.lua'
&nbsp;&nbsp;&nbsp;no file 'C:&#92;QUIK_2&#92;socket.lua'
&nbsp;&nbsp;&nbsp;no file 'C:&#92;QUIK_2&#92;socket&#92;init.lua'
&nbsp;&nbsp;&nbsp;no file 'C:&#92;QUIK_2&#92;Include&#92;socket.lua'
&nbsp;&nbsp;&nbsp;no file 'C:&#92;QUIK_2&#92;Include&#92;socket.luac'
&nbsp;&nbsp;&nbsp;no file 'C:&#92;QUIK_2&#92;LuaIndicators&#92;socket.lua'
&nbsp;&nbsp;&nbsp;no file 'C:&#92;QUIK_2&#92;LuaIndicators&#92;socket.luac'
&nbsp;&nbsp;&nbsp;no file 'C:&#92;Program Files (x86)&#92;Lua&#92;5.1&#92;lua&#92;socket.lua'
&nbsp;&nbsp;&nbsp;no file 'C:&#92;Program Files&#92;Lua&#92;5.1&#92;lua&#92;socket.lua'
&nbsp;&nbsp;&nbsp;no file '.&#92;socket.dll'
&nbsp;&nbsp;&nbsp;no file 'C:&#92;QUIK_2&#92;socket.dll'
&nbsp;&nbsp;&nbsp;no file 'C:&#92;QUIK_2&#92;loadall.dll'
&nbsp;&nbsp;&nbsp;no file 'C:&#92;QUIK_2&#92;Include&#92;socket.dll'
&nbsp;&nbsp;&nbsp;no file 'C:&#92;QUIK_2&#92;LuaIndicators&#92;socket.dll'
</pre>
============= <br />
			<i>01.12.2021 14:52:20, Иван.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message59952/topic6739/</link>
			<guid>http://forum.quik.ru/messages/forum10/message59952/topic6739/</guid>
			<pubDate>Wed, 01 Dec 2021 14:52:20 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Quik - чтение почты</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message59924/topic6739/">Quik - чтение почты</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			<br />====quote====<br /><a class="blog-p-user-name" id="bp_F6IdrokC" href="/user/13936/" bx-tooltip-user-id="13936">Иван</a> написал:<br />Спасибо за развернутый ответ.<br />Можно пример с вашей консольной программы.<br />=============<br />Она написана на C#. Я её ещё не выкладывал в открытый доступ.<br /><br />Но, все можно найти в примерах MailKit: <noindex><a href="https://github.com/jstedfast/MailKit" target="_blank" rel="nofollow">https://github.com/jstedfast/MailKit</a></noindex> <br />
			<i>30.11.2021 18:52:01, Nikolay.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message59924/topic6739/</link>
			<guid>http://forum.quik.ru/messages/forum10/message59924/topic6739/</guid>
			<pubDate>Tue, 30 Nov 2021 18:52:01 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Quik - чтение почты</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message59923/topic6739/">Quik - чтение почты</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			<br />====quote====<br /><a class="blog-p-user-name" id="bp_SkrTealk" href="/user/3132/" bx-tooltip-user-id="3132">Nikolay</a> написал:<br />Речь не про консольную команду, а про консольную программу - читай сервис постоянно работающий и читающий почту.<br /><br />В примере, что был приведен, видны зависимости:<br /> 
====code====
<pre>&nbsp;&nbsp; local&nbsp;&nbsp;imap4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;&nbsp;require&nbsp;&nbsp;'imap4'&nbsp;&nbsp;

 local&nbsp;&nbsp;ssl&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;&nbsp; require ( "ssl" )&nbsp;&nbsp; </pre>
=============
 <br />т.е. необходимо иметь библиотеку imap4, ссылка на которую была приведена.<br />Также, если используется ssl, то необходима ssl.<br /><br />Если посмотреть на код библиотеки imap, то видно, что для ее работы необходима socket<br /><br /> 
====code====
<pre>&nbsp;&nbsp; local&nbsp;&nbsp;socket&nbsp;&nbsp;=&nbsp;&nbsp;require&nbsp;&nbsp;'socket'&nbsp;&nbsp; </pre>
=============
 <br />Поэтому необходимый минимум - это библиотеки imap и socket, что и было написано выше.<br />=============<br />Спасибо за развернутый ответ.<br />Можно пример с вашей консольной программы. <br />
			<i>30.11.2021 18:21:44, Иван.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message59923/topic6739/</link>
			<guid>http://forum.quik.ru/messages/forum10/message59923/topic6739/</guid>
			<pubDate>Tue, 30 Nov 2021 18:21:44 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Quik - чтение почты</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message59922/topic6739/">Quik - чтение почты</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Речь не про консольную команду, а про консольную программу - читай сервис постоянно работающий и читающий почту.<br /><br />В примере, что был приведен, видны зависимости:<br />
====code====
<pre>local imap4&nbsp;&nbsp;&nbsp;&nbsp; = require 'imap4' 

local ssl&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = require("ssl") </pre>
=============
<br />т.е. необходимо иметь библиотеку imap4, ссылка на которую была приведена.<br />Также, если используется ssl, то необходима ssl.<br /><br />Если посмотреть на код библиотеки imap, то видно, что для ее работы необходима socket<br /><br />
====code====
<pre>local socket = require 'socket'</pre>
=============
<br />Поэтому необходимый минимум - это библиотеки imap и socket, что и было написано выше. <br />
			<i>30.11.2021 18:19:32, Nikolay.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message59922/topic6739/</link>
			<guid>http://forum.quik.ru/messages/forum10/message59922/topic6739/</guid>
			<pubDate>Tue, 30 Nov 2021 18:19:32 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Quik - чтение почты</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message59921/topic6739/">Quik - чтение почты</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			<br />====quote====<br /><a class="blog-p-user-name" id="bp_O2VwcrlJ" href="/user/3132/" bx-tooltip-user-id="3132">Nikolay</a> написал:<br />Если не использовать SSL, то достаточно<br />socket - найдете здесь &nbsp;<noindex><a href="https://forum.quik.ru/forum10/topic6902/" target="_blank" rel="nofollow">https://forum.quik.ru/forum10/topic6902/</a></noindex> <br />imap - &nbsp;<noindex><a href="https://github.com/vrld/imap4.lua" target="_blank" rel="nofollow">https://github.com/vrld/imap4.lua</a></noindex> <br /><br />Если же использовать SSL, то необходимо иметь luasec. Я стабильно работающую с 5.4 и 5.3 не нашел.<br /><br />Поэтому, чтобы не зависеть от библиотек lua, уже давно написал себе консольную программку, читающую почту и записывающую в файлы, которые уже скрипт читает и обрабатывает.<br />=============<br />1) Очень интересная идея с консольной командой. Можно пример исходник (так понимаю это можно написать через блокнот). Вы ее потом как запускаете - через Quik?<br />2) Не совсем пойму по вашим ссылкам нужно использовать socket + imap или как?<br />3) Чем лучше SSL и можно ли без него? <br />
			<i>30.11.2021 18:10:32, Иван.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message59921/topic6739/</link>
			<guid>http://forum.quik.ru/messages/forum10/message59921/topic6739/</guid>
			<pubDate>Tue, 30 Nov 2021 18:10:32 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Quik - чтение почты</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message59753/topic6739/">Quik - чтение почты</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Если не использовать SSL, то достаточно<br />socket - найдете здесь <noindex><a href="https://forum.quik.ru/forum10/topic6902/" target="_blank" rel="nofollow">https://forum.quik.ru/forum10/topic6902/</a></noindex><br />imap - <noindex><a href="https://github.com/vrld/imap4.lua" target="_blank" rel="nofollow">https://github.com/vrld/imap4.lua</a></noindex><br /><br />Если же использовать SSL, то необходимо иметь luasec. Я стабильно работающую с 5.4 и 5.3 не нашел.<br /><br />Поэтому, чтобы не зависеть от библиотек lua, уже давно написал себе консольную программку, читающую почту и записывающую в файлы, которые уже скрипт читает и обрабатывает. <br />
			<i>23.11.2021 09:55:44, Nikolay.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message59753/topic6739/</link>
			<guid>http://forum.quik.ru/messages/forum10/message59753/topic6739/</guid>
			<pubDate>Tue, 23 Nov 2021 09:55:44 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Quik - чтение почты</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message59752/topic6739/">Quik - чтение почты</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			<br />====quote====<br /><a class="blog-p-user-name" id="bp_i65IJSSe" href="/user/3132/" bx-tooltip-user-id="3132">Nikolay</a> написал:<br />даже на этом форуме есть поиск.<br /><br />socket - это библиотека для lua. Она включает в себя как lua файлы, так и dll. Она должна быть собрана под нужную версию lua.<br /><br />imap4 - это тоже библиотека. Поиск любой системе выведет на репозитарий проекта.<br />=============<br />Если есть знатоки и у кого-то есть возможность (готов за вознаграждение) - помогите пожалуйста реализовать чтение почты на lua в Quik 8-версии.<br />Нужны исходники Lua-скрипта, который читает почтовый ящик mail.ru и файлы библиотек, которые нужно закинуть в папку quik.<br />У меня не получило найти библиотки и запустить чтение почты. <br />
			<i>23.11.2021 09:42:45, Иван.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message59752/topic6739/</link>
			<guid>http://forum.quik.ru/messages/forum10/message59752/topic6739/</guid>
			<pubDate>Tue, 23 Nov 2021 09:42:45 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Quik - чтение почты</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message58387/topic6739/">Quik - чтение почты</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			даже на этом форуме есть поиск.<br /><br />socket - это библиотека для lua. Она включает в себя как lua файлы, так и dll. Она должна быть собрана под нужную версию lua.<br /><br />imap4 - это тоже библиотека. Поиск любой системе выведет на репозитарий проекта. <br />
			<i>05.10.2021 09:06:02, Nikolay.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message58387/topic6739/</link>
			<guid>http://forum.quik.ru/messages/forum10/message58387/topic6739/</guid>
			<pubDate>Tue, 05 Oct 2021 09:06:02 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Quik - чтение почты</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message58384/topic6739/">Quik - чтение почты</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Жалко - что никто не может подсказать... <br />
			<i>04.10.2021 21:17:30, Иван.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message58384/topic6739/</link>
			<guid>http://forum.quik.ru/messages/forum10/message58384/topic6739/</guid>
			<pubDate>Mon, 04 Oct 2021 21:17:30 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Quik - чтение почты</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message58322/topic6739/">Quik - чтение почты</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			<br />====quote====<br /><a class="blog-p-user-name" id="bp_RrJuG4Ze" href="/user/3132/" bx-tooltip-user-id="3132">Nikolay</a> написал:<br />Да. socket найти под x64 lua 5.3 можно. А вот ssl - уже сложнее. Хотя, кажется, на форуме выкладывали собранные, рабочие варианты.<br />=============<br />Не совсем понимаю - здесь требуется подключить следующие библиотеки?<br />local imap4 &nbsp; = require &quot;imap4&quot;<br />local Message = require &quot;pop3.message&quot;<br /><br />Зачем сокет?<br />Где найти эти imap4, pop3?<br />Искать нужно dll файлы? <br />
			<i>01.10.2021 21:53:11, Иван.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message58322/topic6739/</link>
			<guid>http://forum.quik.ru/messages/forum10/message58322/topic6739/</guid>
			<pubDate>Fri, 01 Oct 2021 21:53:11 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Quik - чтение почты</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message58294/topic6739/">Quik - чтение почты</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Да. socket найти под x64 lua 5.3 можно. А вот ssl - уже сложнее. Хотя, кажется, на форуме выкладывали собранные, рабочие варианты. <br />
			<i>01.10.2021 08:59:37, Nikolay.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message58294/topic6739/</link>
			<guid>http://forum.quik.ru/messages/forum10/message58294/topic6739/</guid>
			<pubDate>Fri, 01 Oct 2021 08:59:37 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Quik - чтение почты</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message58288/topic6739/">Quik - чтение почты</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Понимаю что нужны библиотеки.<br />Но где их скачать?<br />Это должны быть dll-файлы? <br />
			<i>30.09.2021 21:26:11, Иван.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message58288/topic6739/</link>
			<guid>http://forum.quik.ru/messages/forum10/message58288/topic6739/</guid>
			<pubDate>Thu, 30 Sep 2021 21:26:11 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Quik - чтение почты</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message58276/topic6739/">Quik - чтение почты</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Нужны библиотеки IMAP4, socket. Также, скорее всего, необходима ssl, т.к. найти почту без оного уже сложно. <br />
			<i>30.09.2021 09:22:06, Nikolay.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message58276/topic6739/</link>
			<guid>http://forum.quik.ru/messages/forum10/message58276/topic6739/</guid>
			<pubDate>Thu, 30 Sep 2021 09:22:06 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Quik - чтение почты</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message58267/topic6739/">Quik - чтение почты</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Нашел более понятный пример, но не пойму где взять библиотеки для подключения?
====code====
<pre>local imap4&nbsp;&nbsp; = require "imap4"
local Message = require "pop3.message"

local connection = imap4('imap.qip.ru', 143)

assert(connection:isCapable('IMAP4rev1'))

connection:login('****', '****')

-- Sel ect INBOX with read only permissions.
local info = connection:examine('INBOX')
print(info.exist, info.recent)

-- List info on the 4 most recent mails.
for _,v in pairs(connection:fetch('(UID BODY.PEEK&#91;HEADER.FIELDS (Subject To From Date)&#93;)', (info.exist-4)..':*')) do
&nbsp;&nbsp;&nbsp;&nbsp;print("-------------------------")
&nbsp;&nbsp;&nbsp;&nbsp;local msg = Message(v.BODY.value)
&nbsp;&nbsp;&nbsp;&nbsp;print("ID:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ", msg:id())
&nbsp;&nbsp;&nbsp;&nbsp;print("subject:&nbsp;&nbsp;&nbsp;&nbsp;", msg:subject())
&nbsp;&nbsp;&nbsp;&nbsp;print("to:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ", msg:to())
&nbsp;&nbsp;&nbsp;&nbsp;print("from:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ", msg:from())
&nbsp;&nbsp;&nbsp;&nbsp;print("fr om addr:&nbsp;&nbsp;", msg:from_address())
&nbsp;&nbsp;&nbsp;&nbsp;print("reply:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;", msg:reply_to())
&nbsp;&nbsp;&nbsp;&nbsp;print("reply addr: ", msg:reply_address())
&nbsp;&nbsp;&nbsp;&nbsp;print("trunc:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;", msg:is_truncated())
&nbsp;&nbsp;&nbsp;&nbsp;for i,v in ipairs(msg:full_content()) do
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if v.text then&nbsp;&nbsp;print("&nbsp;&nbsp;", i , "TEXT: ", v.type, #v.text)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else print("&nbsp;&nbsp;", i , "FILE: ", v.type, v.file_name or v.name, #v.data) end
&nbsp;&nbsp;&nbsp;&nbsp;end
end

-- close connection
connection:logout()</pre>
============= <br />
			<i>29.09.2021 21:35:58, Иван.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message58267/topic6739/</link>
			<guid>http://forum.quik.ru/messages/forum10/message58267/topic6739/</guid>
			<pubDate>Wed, 29 Sep 2021 21:35:58 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Quik - чтение почты</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message58266/topic6739/">Quik - чтение почты</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			<br />====quote====<br /><a class="blog-p-user-name" id="bp_vRCTmJri" href="/user/3132/" bx-tooltip-user-id="3132">Nikolay</a> написал:<br />Есть типовой пример.<br /> 
====code====
<pre>&nbsp;&nbsp; local&nbsp;&nbsp;version&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;&nbsp; getInfoParam ( "VERSION" )
 local&nbsp;&nbsp;bits&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&nbsp;&nbsp;version:sub( 1 ,&nbsp;&nbsp;2 )&nbsp;&nbsp;=&nbsp;&nbsp;=&nbsp;&nbsp; '7.'&nbsp;&nbsp; and&nbsp;&nbsp; 'x86'&nbsp;&nbsp; or&nbsp;&nbsp; 'x64' 

 local&nbsp;&nbsp;gSPath&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&nbsp;&nbsp; getScriptPath ()
 local&nbsp;&nbsp;libs_Path&nbsp;&nbsp;=&nbsp;&nbsp; getScriptPath () .. '&#92;&#92;clibs_' .. bits
package.cpath&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;&nbsp;libs_Path .. "&#92;&#92;?.dll;" .. libs_Path .. "&#92;&#92;?&#92;&#92;?.dll;" .. package.cpath
package.path&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&nbsp;&nbsp;gSPath&nbsp;&nbsp;.. "&#92;&#92;?.lua;" .. gSPath&nbsp;&nbsp;.. "&#92;&#92;?&#92;&#92;?.lua;" .. gSPath&nbsp;&nbsp;.. "&#92;&#92;?&#92;&#92;init.lua;" .. package.path

 local&nbsp;&nbsp;imap4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;&nbsp;require&nbsp;&nbsp;'imap4' 
 local&nbsp;&nbsp;ssl&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;&nbsp; require ( "ssl" )

 local&nbsp;&nbsp;imapServer&nbsp;&nbsp;&nbsp;&nbsp; =&nbsp;&nbsp; 'imap.yandex.com' 
 local&nbsp;&nbsp;serverPort&nbsp;&nbsp;&nbsp;&nbsp; =&nbsp;&nbsp; 993 
 local&nbsp;&nbsp;login&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&nbsp;&nbsp; 'login' 
 local&nbsp;&nbsp;password&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&nbsp;&nbsp; 'pass' 

 -- If in doubt, see RFC 3501: 
 -- https://tools.ietf.org/html/rfc3501#section-6 

 -- Create new imap4 connection. 
 -- Port is optional and defaults to 143. 
 local&nbsp;&nbsp;connection&nbsp;&nbsp;=&nbsp;&nbsp;imap4(imapServer, serverPort, {protocol&nbsp;&nbsp;=&nbsp;&nbsp; 'tlsv1' })

 -- If you are connecting to gmail, yahoo or any other server that needs a SSL 
 -- connection before accepting commands, uncomment this line: 
 -- 
 -- connection:enabletls{protocol = 'sslv3'} 
 -- 
 -- You can skip this step by creating the connection using 
 -- 
 -- local connection = imap4('imap.gmail.com', 993, {protocol = 'sslv3'}) 

 -- Print the servers capabilities. 
 print ( table.concat (connection:capability(),&nbsp;&nbsp;', ' ))

 -- Make sure we can do what we came for. 
assert(connection:isCapable( 'IMAP4rev1' ))

 -- Login. Warning: The credentials are sent in plaintext unless you 
 -- tunnel the connection over ssh, or use SSL (either via the method shown 
 -- above or calling connection:starttls(params) before logging in). 
connection:login(login, password)

 -- connection:lsub() lists all subscribed mailboxes. 
 for&nbsp;&nbsp;mb, info&nbsp;&nbsp;in&nbsp;&nbsp;pairs(connection:lsub())&nbsp;&nbsp;do 
&nbsp;&nbsp;&nbsp;&nbsp; -- connection:status(mailbox, items) queries status of a mailbox. 
&nbsp;&nbsp;&nbsp;&nbsp; -- Note: The mailbox name may contain unescaped whitespace. You are 
&nbsp;&nbsp;&nbsp;&nbsp; --&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; responsible to escape it properly - try ("%q"):format(mb). 
&nbsp;&nbsp;&nbsp;&nbsp; local&nbsp;&nbsp;stat&nbsp;&nbsp;=&nbsp;&nbsp;connection:status(mb, {'MESSAGES',&nbsp;&nbsp;'RECENT' ,&nbsp;&nbsp;'UNSEEN' })
&nbsp;&nbsp;&nbsp;&nbsp; print (mb, stat.MESSAGES, stat.RECENT, stat.UNSEEN)
 end 

 -- Sel ect INBOX with read only permissions. 
 local&nbsp;&nbsp;info&nbsp;&nbsp;=&nbsp;&nbsp;connection:examine( 'INBOX' )
 print (info.exist, info.recent)

 -- List info on the 4 most recent mails. 
 -- See https://tools.ietf.org/html/rfc3501#section-6.4.5 
 for&nbsp;&nbsp;_,v&nbsp;&nbsp;in&nbsp;&nbsp;pairs(connection:fetch( '(UID BODY.PEEK&#91;HEADER.FIELDS (From Date Subject)&#93;)' , (info.exist) .. ': * '))&nbsp;&nbsp;do 
&nbsp;&nbsp;&nbsp;&nbsp; -- `v' contains the response as mixed (possibly nested) table. 
&nbsp;&nbsp;&nbsp;&nbsp; -- Keys are stored in the list part. In this example: 
&nbsp;&nbsp;&nbsp;&nbsp; -- 
&nbsp;&nbsp;&nbsp;&nbsp; --&nbsp;&nbsp;&nbsp;&nbsp;v&#91;1&#93; = "UID", v&#91;2&#93; = BODY 
&nbsp;&nbsp;&nbsp;&nbsp; -- 
&nbsp;&nbsp;&nbsp;&nbsp; -- `v&#91;key&#93;' holds the value of that part, e.g. 
&nbsp;&nbsp;&nbsp;&nbsp; -- 
&nbsp;&nbsp;&nbsp;&nbsp; --&nbsp;&nbsp;&nbsp;&nbsp;v.UID = 10 
&nbsp;&nbsp;&nbsp;&nbsp; -- 
&nbsp;&nbsp;&nbsp;&nbsp; -- `v.BODY' is the only exception and returns a table of the format 
&nbsp;&nbsp;&nbsp;&nbsp; -- 
&nbsp;&nbsp;&nbsp;&nbsp; --&nbsp;&nbsp;&nbsp;&nbsp;{parts = part-table, value = response} 
&nbsp;&nbsp;&nbsp;&nbsp; -- 
&nbsp;&nbsp;&nbsp;&nbsp; -- For example: 
&nbsp;&nbsp;&nbsp;&nbsp; -- 
&nbsp;&nbsp;&nbsp;&nbsp; --&nbsp;&nbsp;&nbsp;&nbsp;v.BODY = { 
&nbsp;&nbsp;&nbsp;&nbsp; --&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parts = {"HEADER.FIELDS", {"From", "Date", "Subject"}}, 
&nbsp;&nbsp;&nbsp;&nbsp; --&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value = "Fr om: Foo &#60;foo@bar.baz&#62;&#92;r&#92;nDate:..." 
&nbsp;&nbsp;&nbsp;&nbsp; --&nbsp;&nbsp;&nbsp;&nbsp;} 
&nbsp;&nbsp;&nbsp;&nbsp; print (v.id, v.UID, v.BODY.value)
&nbsp;&nbsp; local&nbsp;&nbsp;txt&nbsp;&nbsp;=&nbsp;&nbsp;connection:fetch( '(BODY.PEEK&#91;TEXT&#93;)' , v.id)
&nbsp;&nbsp; if&nbsp;&nbsp; # txt&nbsp;&nbsp;&#62;&nbsp;&nbsp; 0&nbsp;&nbsp; then 
&nbsp;&nbsp;&nbsp;&nbsp; print (txt&#91; 1 &#93;.BODY.value)
&nbsp;&nbsp; end 
 end 

 -- close connection 
connection:logout()&nbsp;&nbsp;</pre>
=============
 <br />=============<br />Не пойму какие библиотеки нужно подключить?<br />Нашел еще на <noindex><a href="https://github.com/dmj/misc/blob/master/lua/imap.lua/imap.lua" target="_blank" rel="nofollow">https://github.com/dmj/misc/blob/master/lua/imap.lua/imap.lua</a></noindex> <br />
			<i>29.09.2021 21:24:52, Иван.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message58266/topic6739/</link>
			<guid>http://forum.quik.ru/messages/forum10/message58266/topic6739/</guid>
			<pubDate>Wed, 29 Sep 2021 21:24:52 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Quik - чтение почты</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message58203/topic6739/">Quik - чтение почты</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Есть типовой пример.<br />
====code====
<pre>local version&nbsp;&nbsp;&nbsp;&nbsp; = getInfoParam("VERSION")
local bits&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= version:sub(1, 2) == '7.' and 'x86' or 'x64'

local gSPath&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= getScriptPath()
local libs_Path = getScriptPath()..'&#92;&#92;clibs_'..bits
package.cpath&nbsp;&nbsp;&nbsp;&nbsp; = libs_Path.."&#92;&#92;?.dll;"..libs_Path.."&#92;&#92;?&#92;&#92;?.dll;"..package.cpath
package.path&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= gSPath .."&#92;&#92;?.lua;"..gSPath .."&#92;&#92;?&#92;&#92;?.lua;"..gSPath .."&#92;&#92;?&#92;&#92;init.lua;"..package.path

local imap4&nbsp;&nbsp;&nbsp;&nbsp; = require 'imap4'
local ssl&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = require("ssl")

local imapServer&nbsp;&nbsp;&nbsp;&nbsp;= 'imap.yandex.com'
local serverPort&nbsp;&nbsp;&nbsp;&nbsp;= 993
local login&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 'login'
local password&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 'pass'

-- If in doubt, see RFC 3501:
-- https://tools.ietf.org/html/rfc3501#section-6

-- Create new imap4 connection.
-- Port is optional and defaults to 143.
local connection = imap4(imapServer, serverPort, {protocol = 'tlsv1'})

-- If you are connecting to gmail, yahoo or any other server that needs a SSL
-- connection before accepting commands, uncomment this line:
--
-- connection:enabletls{protocol = 'sslv3'}
--
-- You can skip this step by creating the connection using
--
-- local connection = imap4('imap.gmail.com', 993, {protocol = 'sslv3'})

-- Print the servers capabilities.
print(table.concat(connection:capability(), ', '))

-- Make sure we can do what we came for.
assert(connection:isCapable('IMAP4rev1'))

-- Login. Warning: The credentials are sent in plaintext unless you
-- tunnel the connection over ssh, or use SSL (either via the method shown
-- above or calling connection:starttls(params) before logging in).
connection:login(login, password)

-- connection:lsub() lists all subscribed mailboxes.
for mb, info in pairs(connection:lsub()) do
&nbsp;&nbsp;&nbsp;&nbsp;-- connection:status(mailbox, items) queries status of a mailbox.
&nbsp;&nbsp;&nbsp;&nbsp;-- Note: The mailbox name may contain unescaped whitespace. You are
&nbsp;&nbsp;&nbsp;&nbsp;--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; responsible to escape it properly - try ("%q"):format(mb).
&nbsp;&nbsp;&nbsp;&nbsp;local stat = connection:status(mb, {'MESSAGES', 'RECENT', 'UNSEEN'})
&nbsp;&nbsp;&nbsp;&nbsp;print(mb, stat.MESSAGES, stat.RECENT, stat.UNSEEN)
end

-- Sel ect INBOX with read only permissions.
local info = connection:examine('INBOX')
print(info.exist, info.recent)

-- List info on the 4 most recent mails.
-- See https://tools.ietf.org/html/rfc3501#section-6.4.5
for _,v in pairs(connection:fetch('(UID BODY.PEEK&#91;HEADER.FIELDS (From Date Subject)&#93;)', (info.exist)..':*')) do
&nbsp;&nbsp;&nbsp;&nbsp;-- `v' contains the response as mixed (possibly nested) table.
&nbsp;&nbsp;&nbsp;&nbsp;-- Keys are stored in the list part. In this example:
&nbsp;&nbsp;&nbsp;&nbsp;--
&nbsp;&nbsp;&nbsp;&nbsp;--&nbsp;&nbsp;&nbsp;&nbsp;v&#91;1&#93; = "UID", v&#91;2&#93; = BODY
&nbsp;&nbsp;&nbsp;&nbsp;--
&nbsp;&nbsp;&nbsp;&nbsp;-- `v&#91;key&#93;' holds the value of that part, e.g.
&nbsp;&nbsp;&nbsp;&nbsp;--
&nbsp;&nbsp;&nbsp;&nbsp;--&nbsp;&nbsp;&nbsp;&nbsp;v.UID = 10
&nbsp;&nbsp;&nbsp;&nbsp;--
&nbsp;&nbsp;&nbsp;&nbsp;-- `v.BODY' is the only exception and returns a table of the format
&nbsp;&nbsp;&nbsp;&nbsp;--
&nbsp;&nbsp;&nbsp;&nbsp;--&nbsp;&nbsp;&nbsp;&nbsp;{parts = part-table, value = response}
&nbsp;&nbsp;&nbsp;&nbsp;--
&nbsp;&nbsp;&nbsp;&nbsp;-- For example:
&nbsp;&nbsp;&nbsp;&nbsp;--
&nbsp;&nbsp;&nbsp;&nbsp;--&nbsp;&nbsp;&nbsp;&nbsp;v.BODY = {
&nbsp;&nbsp;&nbsp;&nbsp;--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parts = {"HEADER.FIELDS", {"From", "Date", "Subject"}},
&nbsp;&nbsp;&nbsp;&nbsp;--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value = "Fr om: Foo &#60;foo@bar.baz&#62;&#92;r&#92;nDate:..."
&nbsp;&nbsp;&nbsp;&nbsp;--&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;print(v.id, v.UID, v.BODY.value)
&nbsp;&nbsp;local txt = connection:fetch('(BODY.PEEK&#91;TEXT&#93;)', v.id)
&nbsp;&nbsp;if #txt &#62; 0 then
&nbsp;&nbsp;&nbsp;&nbsp;print(txt&#91;1&#93;.BODY.value)
&nbsp;&nbsp;end
end

-- close connection
connection:logout()</pre>
============= <br />
			<i>27.09.2021 09:31:42, Nikolay.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message58203/topic6739/</link>
			<guid>http://forum.quik.ru/messages/forum10/message58203/topic6739/</guid>
			<pubDate>Mon, 27 Sep 2021 09:31:42 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Quik - чтение почты</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message58200/topic6739/">Quik - чтение почты</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Можно ли через QUIK с помощью LUA прочитать список email писем (mail.ru)? <br />Есть ли образец скрипта как это можно сделать? <br />
			<i>27.09.2021 05:32:44, Иван.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message58200/topic6739/</link>
			<guid>http://forum.quik.ru/messages/forum10/message58200/topic6739/</guid>
			<pubDate>Mon, 27 Sep 2021 05:32:44 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
	</channel>
</rss>
