Qore Pop3Client Module Reference: Pop3Client Module

Qore Pop3Client Module Reference 1.3

- Main Page
- Related Pages
- Namespaces
- Classes

All Classes Namespaces Functions Variables Groups Pages
Pop3Client Module

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 class is:

- Pop3Client: provides an interface to a POP3 server for retrieving emails

Example:
  #!/usr/bin/env qore -n
  %requires Pop3Client
  sub log(string msg) {
  printf("%y: %s\n", now_ms(), vsprintf(msg, argv));
  }
  string url = "pop3s://username:pass@pop.gmail.com";
  Pop3Client pop3(url, \log(), \log());
  # do not send a QUIT so changes will not be committed
  pop3.noquit(True);
  hash h = pop3.getMail();
  printf("Mailbox Summary:\n");
  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();
  if (!h)
  printf("no messages\n");