Link | email_check |
Author | Jason Huck |
Category | |
Version | 8.5.x |
License | Public Domain |
Posted | 02 Aug 2007 |
Updated | 02 Aug 2007 |
More by this author... |
Checks the specified POP account for messages. Optionally deletes the messages from the server. Returns an array of pairs. The key for each pair is the UID for the message and the value is the parsed message object.
var('msgs') = email_check( -host='mailserver.tld', -username='jdoe@mailserver.tld', -password='secret', -delete=true );
Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.
define_tag( 'check', -namespace='email_', -req='host', -req='username', -req='password', -opt='delete', -type='boolean', -priority='replace', -description='Checks the specified POP account for messages.' ); !local_defined('delete') ? local('delete') = false; local('pop') = email_pop( -host=#host, -username=#username, -password=#password ); null(#pop->size); // workaround for bug in LP8.5.3b1 local('msgs') = array; iterate(#pop, local('i')); #msgs->insert(#i = email_parse(#pop->retrieve)); #delete ? #pop->delete(loop_count); /iterate; #pop->close; return(#msgs); /define_tag;
No comments
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft