1 export const MESSAGE_FLAGS = {
2 FLAG_RECEIVED: Math.pow(2, 0), // whether a message is received
3 FLAG_SENT: Math.pow(2, 1), // whether a message is sent
4 FLAG_INTERNAL: Math.pow(2, 2), // whether the message is between Proton Mail recipients
5 FLAG_E2E: Math.pow(2, 3), // whether the message is end-to-end encrypted
6 FLAG_AUTO: Math.pow(2, 4), // whether the message is an autoresponse
7 FLAG_REPLIED: Math.pow(2, 5), // whether the message is replied to
8 FLAG_REPLIEDALL: Math.pow(2, 6), // whether the message is replied all to
9 FLAG_FORWARDED: Math.pow(2, 7), // whether the message is forwarded
10 FLAG_AUTOREPLIED: Math.pow(2, 8), // whether the message has been responded to with an autoresponse
11 FLAG_IMPORTED: Math.pow(2, 9), // whether the message is an import
12 FLAG_OPENED: Math.pow(2, 10), // whether the message has ever been opened by the user
13 FLAG_RECEIPT_SENT: Math.pow(2, 11), // whether a read receipt has been sent in response to the message
14 FLAG_RECEIPT_REQUEST: Math.pow(2, 16), // whether to request a read receipt for the message
15 FLAG_PUBLIC_KEY: Math.pow(2, 17), // whether to attach the public key
16 FLAG_SIGN: Math.pow(2, 18), // whether to sign the message
17 FLAG_UNSUBSCRIBED: Math.pow(2, 19), // Unsubscribed from newsletter
18 FLAG_SCHEDULED_SEND: Math.pow(2, 20), // Messages that have been delayed send
19 FLAG_UNSUBSCRIBABLE: Math.pow(2, 21), // Messages that are unsubscribable
20 FLAG_DMARC_FAIL: Math.pow(2, 26), // Incoming mail failed dmarc authentication.
21 FLAG_HAM_MANUAL: Math.pow(2, 27), // The message is in spam and the user moves it to a new location that is not spam or trash (e.g. inbox or archive).
22 FLAG_PHISHING_AUTO: Math.pow(2, 30), // Incoming mail is marked as phishing by anti-spam filters.
23 FLAG_FROZEN_EXPIRATION: BigInt(Math.pow(2, 32)), // Messages where the expiration time cannot be changed
24 FLAG_SUSPICIOUS: BigInt(Math.pow(2, 33)), // System flagged this message as a suspicious email
25 FLAG_AUTO_FORWARDER: BigInt(Math.pow(2, 34)), // Message is auto-forwarded
26 FLAG_AUTO_FORWARDEE: BigInt(Math.pow(2, 35)), // Message is auto-forwarded
29 export enum VERIFICATION_STATUS {
34 SIGNED_NO_PUB_KEY = 3,
37 // Protonmail enforces signing outgoing messages since January 1, 2019. It does not sign bulk messages yet
38 export const SIGNATURE_START = {
43 export enum BLOCK_SENDER_CONFIRMATION {
47 export const ATTACHMENT_MAX_COUNT = 100;
49 export enum ATTACHMENT_DISPOSITION {
50 ATTACHMENT = 'attachment',
54 export enum MARK_AS_STATUS {
59 export const AUTO_REPLY_CHARACTER_COUNT_LIMIT = 4000;