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
Name | Type | Description |
---|---|---|
uid | number | Unique id of the mail |
seq | number | Sequence number of the mail |
mailbox | Mailbox | Mailbox 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.
Parameter | Type | Description |
---|---|---|
toMailboxPath | string | Mailbox's name (path) where to move the mail |
mail.copy(toMailboxPath)
Copy this mail to another mailbox.
Parameter | Type | Description |
---|---|---|
toMailboxPath | string | Mailbox's name (path) where to copy the mail |
mail.addFlags(flags)
Add flags to this mail.
Parameter | Type | Description |
---|---|---|
flags | string[] | Flag's names to add |
mail.removeFlags(flags)
Remove flags from this mail.
Parameter | Type | Description |
---|---|---|
flags | string[] | Flag's names to remove |
mail.see()
Mark this mail as seen.
mail.unsee()
Mark this mail as unseen.