Skip to main content

Mail

The mail object implements ParsedMail from mailparser.

You only deal with this object when you are receiving mails from IMAP server (not for sending mails).

Properties

NameTypeDescription
uidnumberUnique id of the mail
seqnumberSequence number of the mail
mailboxMailboxMailbox object of where the mail is
......All the properties of ParsedMail

Methods

mail.delete()

Delete this mail

mail.move(toMailboxPath)

Move this mail to another mailbox.

ParameterTypeDescription
toMailboxPathstringMailbox's name (path) where to move the mail

mail.copy(toMailboxPath)

Copy this mail to another mailbox.

ParameterTypeDescription
toMailboxPathstringMailbox's name (path) where to copy the mail

mail.addFlags(flags)

Add flags to this mail.

ParameterTypeDescription
flagsstring[]Flag's names to add

mail.removeFlags(flags)

Remove flags from this mail.

ParameterTypeDescription
flagsstring[]Flag's names to remove

mail.see()

Mark this mail as seen.

mail.unsee()

Mark this mail as unseen.