Skip to content
This repository was archived by the owner on May 1, 2025. It is now read-only.

Message

mixedpuppy edited this page Feb 3, 2011 · 3 revisions

Message Example

{
    // only important headers are included, a seperate call for raw headers
    // could be available
    mid: "message id",
    receivedDate: "UTC date", // Date message was received
    subject: "Content of the subject line",
    from: { // 	Address of the sender
        name: "Shane Caraveo",
        email: "shane@caraveo.com"
    },
    replyto: { // 	The email address that should receive any reply
        name: "Shane Caraveo",
        email: "shane@caraveo.com"
    },
    to: [ // 	list of recipient addresses
        { 
            name: "Shane Caraveo",
            email: "shane@caraveo.com"
        },
    ],
    cc: [ // 	list of recipient addresses
        { 
            name: "Shane Caraveo",
            email: "shane@caraveo.com"
        },
    ],
    bcc: [ // 	list of recipient addresses
        { 
            name: "Shane Caraveo",
            email: "shane@caraveo.com"
        },
    ],
    parts: [
        {
            partId: "",// 	Unique identifier for the message part
            type: "",// 	MIME multi-part message type
            subtype: "",// 	MIME multi-part message sub-type
            typeParams: "",// 	Type parameters
            disposition: "",// 	How information is presented to the user: inline or attachment
            dispParams: "",// 	Disposition parameters
            encoding: "",// 	Type of encoding: 7bit, 8bit/binary, quoted-printable, or base64
            filename: "",// 	Filename if this is an attachment
            size: "",// 	Size in bytes of the part
            isTruncated: "",// 	If the message body is truncated
            contentId: "",// 	Unique identifier for the part
            referencedInline: "",// 	If the part is referenced inline by another part of the message
            text: "",// 	Part content
            attachments: [ // 	AttachmentInfo
                {
                    name: "", // 	Name of the attachment file
                    size: "", // 	Size in bytes of the attachment
                    id: "" // 	ID identifying the attachment
                }
            ]
        }
    ],
    // flags are typically returned in a listMessages call rather than 
    // the message itself, whether they are included in the message itself
    // may or may not be useful for us
    flags: {
        isReplied: "0",  
        isFlagged: "0",  
        isRead: "0",
        isDraft: "0",   
        isForwarded: "0",   
        isHam: "0",
        isSpam: "0",   
        hasAttachment: "0",
        inAddressBook: "0"
    }
}

Clone this wiki locally