1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00

Updated Email (markdown)

Neil Kolban 2016-03-06 21:13:20 -06:00
parent a2a716542f
commit 6b011a4a3e

@ -32,6 +32,8 @@ Consider an email message that is sitting on an email server. It appears that a
__Question__: Is the email message retrieved via IMAP and POP3 the same format/content? If I retrieve the "blob-o-data" that represents my email, do I get the same think with both IMAP and POP3 retrievers?
__Question__: For POP3 clients, is it acceptable to delete/destroy a message once received and processed?
---
### Related forum posts and issues:
@ -55,3 +57,34 @@ __Question__: Is the email message retrieved via IMAP and POP3 the same format/c
### Technical tasks
* How do we retrieve an email using POP3?
Examining the documentation for poplib, the high level is:
```
var client = new POP3Client(...);
// Called when the client had connected to the POP3 server ...
client.on("connect", function() {
client.login(...); // Login to the server
});
// Called when we have logged in ...
client.on("login", function(..., rawdata) {
client.list(); // List the messages
});
// Called with a list response ...
client.on("list", function(...) {
client.retr(...); // Retrieve a message
});
// Called when a message has been retrieved ...
client.on("retr", function(...) {
client.dele(...); // Delete a message
});
// Called when a message has been deleted ...
client.on("dele", function(...) {
});
```
* What does the response from a POP3 'list' request look like?