Innov-AI
    Documentation | MentDB Weak Server
Generate MQL to DOWNLOAD mails/attachements from a POP3 connection

  • To generate MQL to DOWNLOAD mails/attachements from an POP3 connection:
  • Right click on 'demo_cm_pop3' and select 'GEN > DOWNLOAD MAILS
  • 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";
  • Update the script and save
  • Execute buttons
Services     Supporters     Contact     About     Legal notice © 2024