pop3mail v0.1.8 Pop3mail.Handler
Glue code for received mail to call the parse, decode and store functions
Summary
Functions
Check if the mail must be skipped, if not process and store the email
Convert date to a directory name meant for storing the email. Returned date is in format yyyymmdd_hhmmss
Decode body: multipart content, base64 and quoted-printable
Extract the sender name from the email ‘From’ header
Create directory for the email based on date andd subject, save raw email, store header summary and store everything from the body
Decode and store body
This function makes sure that the encoding markers are removed and the text decoded
Functions
Check if the mail must be skipped, if not process and store the email.
It checks if the email has or hasn’t got the Delivered-To header. Mail could be moved from the sent box to the inbox.
mail
- Handler.Mail
options
- Handler.Options
Convert date to a directory name meant for storing the email. Returned date is in format yyyymmdd_hhmmss
date_str
- string with the date. Must be conform RFC 2822 date format.
Decode body: multipart content, base64 and quoted-printable.
Returns a list of Pop3mail.Part’s.
header_list
- list with tuples of {:header, header name, header value}. Name and value are character lists.
Create directory for the email based on date andd subject, save raw email, store header summary and store everything from the body.
mail
- Handler.Mail
options
- Handler.Options
Decode and store body.
header_list
- list with tuples of {:header, header name, header value}. Name and value are character lists.
This function makes sure that the encoding markers are removed and the text decoded.
However, it does not convert to a standard encoding like utf-8 and it also doesn’t mention the encoding types used. What you get is a binary which you might be able to read depending on the character encoding set in your terminal/device/program.