INNOV-AI

Innovation and Research from Réunion Island, France

Back   Home

Download mails from POP3 remote connection @ CONNECT - Connections @ MentDB Weak

> Start the server
> (or start the server for the first time (embedded mode - H2 Database))
> (or start the server for the first time (remote mode - MySQL 8 Database))
> Open the MentDB Weak Editor

Click on 'CONNECT' tab, open 'Mail', right click on 'demo_cm_pop3' and select 'GEN > DOWNLOAD MAILS'

MQL INPUT
script create post "demo.file.pop3.download" false 1 
  (param
  ;) 
  "Download mail through POP3" 
{

	#Initialization;
	-> "[Directory]" "/Users/jimmitry/Desktop/tmp";

	#Mail download;
	json load "pop3" (mail download pop3 [Directory]
	3 true
	{cm get "demo_cm_pop3";});

	

	if (> (json select "pop3" "/NbReceived") 0) {
	
		json load "files" (file dir_list [Directory]);
		-> "[nb_files]" (json count "files" /);
		for (-> "[i]" 0) (< [i] [nb_files]) (++ "[i]") {
		
			-> "[cur_filename]" (json select "files" (concat "/[" [i] "]"));
	
			#Load the mail;
			json load "mail" (concat [Directory] "/" [cur_filename]);
			
			#Here your action;
			
			
		};
	
	};
	
	
} "Return nothing";
start: 2026-01-17   end: 2026-01-31   v_start: 400   v_end: