POPPost is a module for Drupal that watches a POP3 mailbox and creates nodes from incoming emails.
Mail reading is scheduled by cron. Every time it runs:
The mails are created in as follows:
Subject:
[NODE:nodetype] title of the node
Body (the 'text' in multipart mails):
this text will be ignored -----BEGIN DRUPAL NODE----- Param1: value1 Param2: value2 the content of the node -----END DRUPAL NODE----- -- this signature is ignored
This will create a node of type nodetype, titled "title of the node" and with content "the content of the node".
Parameters Param1 and Param2 are added to the node in a way like:
$node->Param1="value1" $node->Param2="value2"
..this is useful when creating nodes with more fields than just title and body.
Of course, we need an authentication mechanism more sofisticated than just checking the sender of the email, because the From: field is easily spoofable. At the moment, we use the email address to determine the uid of the author, and a per-user control code that must be present in the message to check the autenticity of the message. In the future, it will be cool to use another authentication method, such as GPG signature control..
..and, of course, I'm planning to process also attachments to the mail and add them as attachments to the created node.