Mail functions

pop3.­pop(options)
Retreives a list of mails in inbox ready for download from server.
pop3.­del­ete(options, identifier)
Deletes a single email message from POP3 server by identifier.
pop3.­get(options, identifier)
Gets / downloads a single email message from POP3 server into a variable.
pop3.­get­H­ea­der(options, identifier)
Gets the header fields for a single email message from POP3 server into a variable.
smtp.­sen­d(config, message)
Send email by SMTP.
imap.­con­n­ec­t(config)
Creates a new imap session and connects to server.
imap.­get­C­oun­t(session, folder)
Retrieves the current number of messages in the inbox.
imap.­del­ete(session, message)
Deletes a specific message from the inbox.
imap.­get­M­es­sage(session, index / uid, headersOnly, folder)
Retreives message by index from inbox using the provided imap session.
imap.­dis­c­on­nec­t(connection)
Disconnects an existing imap session.