Qore Pop3Client Module Reference  1.5
 All Classes Namespaces Functions Variables Groups Pages
Pop3Client Module

Pop3Client Module Introduction

The Pop3Client module provides the Pop3Client class for retrieving emails from a POP3 server, with or without TLS/SSL encryption.

To use this module, use "%requires Pop3Client" in your code. See examples/pop3.q for an example program using this module.

All the public symbols in the module are defined in the Pop3Client namespace.

The main classes are:

Example:
1 #!/usr/bin/env qore
2 
3 %new-style
4 %strict-args
5 %require-types
6 %enable-all-warnings
7 
8 %requires Pop3Client
9 
10 sub log(string msg) {
11  printf("%y: %s\n", now_ms(), vsprintf(msg, argv));
12 }
13 
14 string url = "pop3s://username:pass@pop.gmail.com";
15 Pop3Client pop3(url, \log(), \log());
16 # do not send a QUIT so changes will not be committed
17 pop3.noquit(True);
18 *hash h = pop3.getMail();
19 printf("Mailbox Summary:\n");
20 map printf("%s: From: %s (size: %d bytes, attachments: %d)\n", $1.key, $1.value.msg.getFrom(), $1.value.size, $1.getvalue.msg.getAttachments().size()), h.pairIterator();
21 if (!h)
22  printf("no messages\n");
Note
based on http://tools.ietf.org/html/rfc1939 (POP3)

Pop3Client Module Release Notes

Pop3Client 1.5

Pop3Client 1.4

Pop3Client 1.3

  • added socket instrumention support from Qore 0.8.9

Pop3Client 1.2

  • uncommented the "connected" debug message

Pop3Client 1.1

  • added the logPassword() methods and masked password by default in the debug log

Pop3Client 1.0

  • initial release