Section13 pages
Mail functions
Functions for sending email through SMTP and reading inbound mail through IMAP and POP3.
pop3.pop(options)Retrieves a list of mails in inbox ready for download from server.pop3.delete(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.getHeader(options, identifier)Gets the header fields for a single email message from POP3 server into a variable.smtp.send(config, message)Send email by SMTP.imap.connect(config)Creates a new imap session and connects to server.imap.getCount(session, folder?)Retrieves the current number of messages in the inbox.imap.delete(session, message)Deletes a specific message from the inbox.imap.getMessage(session, index / uid, headersOnly?, folder?)Retrieves message by index from inbox using the provided imap session.imap.disconnect(connection)Disconnects an existing imap session.ImapClientMk(config)Creates an IMAP client and connects to the server: new docly.ImapClientMk(config). The client keeps the connection open, so several calls…Pop3ClientMk(config)Creates a POP3 client and connects to the server: new docly.Pop3ClientMk(config). The client keeps the connection open, so several calls…SmtpClientMk(config)Creates an SMTP client, connects and logs in: new docly.SmtpClientMk(config). Use it to send several messages over one connection. Call…