jens@17: /* jens@17: * Mail.h jens@17: */ jens@17: jens@17: #import jens@17: #import jens@17: jens@17: jens@17: @class MailItem, MailApplication, MailColor, MailDocument, MailWindow, MailText, MailAttachment, MailParagraph, MailWord, MailCharacter, MailAttributeRun, MailOutgoingMessage, MailLdapServer, MailApplication, MailMessageViewer, MailSignature, MailMessage, MailAccount, MailImapAccount, MailMacAccount, MailPopAccount, MailSmtpServer, MailMailbox, MailRule, MailRuleCondition, MailRecipient, MailBccRecipient, MailCcRecipient, MailToRecipient, MailContainer, MailHeader, MailMailAttachment; jens@17: jens@17: typedef enum { jens@17: MailSavoYes = 'yes ' /* Save the file. */, jens@17: MailSavoNo = 'no ' /* Do not save the file. */, jens@17: MailSavoAsk = 'ask ' /* Ask the user whether or not to save the file. */ jens@17: } MailSavo; jens@17: jens@17: typedef enum { jens@17: MailEdmfPlainText = 'dmpt' /* Plain Text */, jens@17: MailEdmfRichText = 'dmrt' /* Rich Text */ jens@17: } MailEdmf; jens@17: jens@17: typedef enum { jens@17: MailHedeAll = 'hdal' /* All */, jens@17: MailHedeCustom = 'hdcu' /* Custom */, jens@17: MailHedeDefault = 'hdde' /* Default */, jens@17: MailHedeNoHeaders = 'hdnn' /* No headers */ jens@17: } MailHede; jens@17: jens@17: typedef enum { jens@17: MailLdasBase = 'lsba' /* LDAP scope of 'Base' */, jens@17: MailLdasOneLevel = 'lsol' /* LDAP scope of 'One Level' */, jens@17: MailLdasSubtree = 'lsst' /* LDAP scope of 'Subtree' */ jens@17: } MailLdas; jens@17: jens@17: typedef enum { jens@17: MailQqclBlue = 'ccbl' /* Blue */, jens@17: MailQqclGreen = 'ccgr' /* Green */, jens@17: MailQqclOrange = 'ccor' /* Orange */, jens@17: MailQqclOther = 'ccot' /* Other */, jens@17: MailQqclPurple = 'ccpu' /* Purple */, jens@17: MailQqclRed = 'ccre' /* Red */, jens@17: MailQqclYellow = 'ccye' /* Yellow */ jens@17: } MailQqcl; jens@17: jens@17: typedef enum { jens@17: MailMvclAttachmentsColumn = 'ecat' /* Column containing the number of attachments a message contains */, jens@17: MailMvclBuddyAvailabilityColumn = 'ecba' /* Column indicating whether the sender of a message is online or not */, jens@17: MailMvclMessageColor = 'eccl' /* Used to indicate sorting should be done by color */, jens@17: MailMvclDateReceivedColumn = 'ecdr' /* Column containing the date a message was received */, jens@17: MailMvclDateSentColumn = 'ecds' /* Column containing the date a message was sent */, jens@17: MailMvclFlagsColumn = 'ecfl' /* Column containing the flags of a message */, jens@17: MailMvclFromColumn = 'ecfr' /* Column containing the sender's name */, jens@17: MailMvclMailboxColumn = 'ecmb' /* Column containing the name of the mailbox or account a message is in */, jens@17: MailMvclMessageStatusColumn = 'ecms' /* Column indicating a messages status (read, unread, replied to, forwarded, etc) */, jens@17: MailMvclNumberColumn = 'ecnm' /* Column containing the number of a message in a mailbox */, jens@17: MailMvclSizeColumn = 'ecsz' /* Column containing the size of a message */, jens@17: MailMvclSubjectColumn = 'ecsu' /* Column containing the subject of a message */, jens@17: MailMvclToColumn = 'ecto' /* Column containing the recipients of a message */ jens@17: } MailMvcl; jens@17: jens@17: typedef enum { jens@17: MailExutPassword = 'axct' /* Clear text password */, jens@17: MailExutApop = 'aapo' /* APOP */, jens@17: MailExutKerberos5 = 'axk5' /* Kerberos 5 */, jens@17: MailExutNtlm = 'axnt' /* NTLM */, jens@17: MailExutMd5 = 'axmd' /* MD5 */, jens@17: MailExutNone = 'ccno' /* None */ jens@17: } MailExut; jens@17: jens@17: typedef enum { jens@17: MailCclrBlue = 'ccbl' /* Blue */, jens@17: MailCclrGray = 'ccgy' /* Gray */, jens@17: MailCclrGreen = 'ccgr' /* Green */, jens@17: MailCclrNone = 'ccno' /* None */, jens@17: MailCclrOrange = 'ccor' /* Orange */, jens@17: MailCclrOther = 'ccot' /* Other */, jens@17: MailCclrPurple = 'ccpu' /* Purple */, jens@17: MailCclrRed = 'ccre' /* Red */, jens@17: MailCclrYellow = 'ccye' /* Yellow */ jens@17: } MailCclr; jens@17: jens@17: typedef enum { jens@17: MailE9xpAllMessagesAndTheirAttachments = 'x9al' /* All messages and their attachments */, jens@17: MailE9xpAllMessagesButOmitAttachments = 'x9bo' /* All messages but omit attachments */, jens@17: MailE9xpDoNotKeepCopiesOfAnyMessages = 'x9no' /* Do not keep copies of any messages */, jens@17: MailE9xpOnlyMessagesIHaveRead = 'x9wr' /* Only messages I have read */ jens@17: } MailE9xp; jens@17: jens@17: typedef enum { jens@17: MailEnrqBeginsWithValue = 'rqbw' /* Begins with value */, jens@17: MailEnrqDoesContainValue = 'rqco' /* Does contain value */, jens@17: MailEnrqDoesNotContainValue = 'rqdn' /* Does not contain value */, jens@17: MailEnrqEndsWithValue = 'rqew' /* Ends with value */, jens@17: MailEnrqEqualToValue = 'rqie' /* Equal to value */, jens@17: MailEnrqLessThanValue = 'rqlt' /* Less than value */, jens@17: MailEnrqGreaterThanValue = 'rqgt' /* Greater than value */, jens@17: MailEnrqNone = 'rqno' /* Indicates no qualifier is applicable */ jens@17: } MailEnrq; jens@17: jens@17: typedef enum { jens@17: MailErutAccount = 'tacc' /* Account */, jens@17: MailErutAnyRecipient = 'tanr' /* Any recipient */, jens@17: MailErutCcHeader = 'tccc' /* Cc header */, jens@17: MailErutMatchesEveryMessage = 'tevm' /* Every message */, jens@17: MailErutFromHeader = 'tfro' /* From header */, jens@17: MailErutHeaderKey = 'thdk' /* An arbitrary header key */, jens@17: MailErutMessageContent = 'tmec' /* Message content */, jens@17: MailErutMessageIsJunkMail = 'tmij' /* Message is junk mail */, jens@17: MailErutSenderIsInMyAddressBook = 'tsii' /* Sender is in my address book */, jens@17: MailErutSenderIsMemberOfGroup = 'tsim' /* Sender is member of group */, jens@17: MailErutSenderIsNotInMyAddressBook = 'tsin' /* Sender is not in my address book */, jens@17: MailErutSenderIsNotMemberOfGroup = 'tsig' /* Sender is not member of group */, jens@17: MailErutSubjectHeader = 'tsub' /* Subject header */, jens@17: MailErutToHeader = 'ttoo' /* To header */, jens@17: MailErutToOrCcHeader = 'ttoc' /* To or Cc header */ jens@17: } MailErut; jens@17: jens@17: typedef enum { jens@17: MailEtocImap = 'etim' /* IMAP */, jens@17: MailEtocPop = 'etpo' /* POP */, jens@17: MailEtocSmtp = 'etsm' /* SMTP */, jens@17: MailEtocMac = 'etit' /* .Mac */ jens@17: } MailEtoc; jens@17: jens@17: jens@17: jens@17: /* jens@17: * Standard Suite jens@17: */ jens@17: jens@17: // Abstract object provides a base class for scripting classes. It is never used directly. jens@17: @interface MailItem : SBObject jens@17: jens@17: @property (copy) NSDictionary *properties; // All of the object's properties. jens@17: jens@17: - (void) open; // Open an object. jens@17: - (void) print; // Print an object. jens@17: - (void) closeSaving:(MailSavo)saving savingIn:(NSURL *)savingIn; // Close an object. jens@17: - (void) delete; // Delete an object. jens@17: - (void) duplicateTo:(SBObject *)to; // Copy object(s) and put the copies at a new location. jens@17: - (BOOL) exists; // Verify if an object exists. jens@17: - (void) moveTo:(SBObject *)to; // Move object(s) to a new location. jens@17: - (void) saveIn:(NSString *)in_ as:(NSString *)as; // Save an object. jens@17: jens@17: @end jens@17: jens@17: // An application's top level scripting object. jens@17: @interface MailApplication : SBApplication jens@17: + (MailApplication *) application; jens@17: jens@17: - (SBElementArray *) documents; jens@17: - (SBElementArray *) windows; jens@17: jens@17: @property (copy, readonly) NSString *name; // The name of the application. jens@17: @property (readonly) BOOL frontmost; // Is this the frontmost (active) application? jens@17: @property (copy, readonly) NSString *version; // The version of the application. jens@17: jens@17: - (void) quitSaving:(MailSavo)saving; // Quit an application. jens@17: - (void) checkForNewMailFor:(MailAccount *)for_; // Triggers a check for email. jens@17: - (NSString *) extractNameFrom:(NSString *)x; // Command to get the full name out of a fully specified email address. E.g. Calling this with "John Doe " as the direct object would return "John Doe" jens@17: - (NSString *) extractAddressFrom:(NSString *)x; // Command to get just the email address of a fully specified email address. E.g. Calling this with "John Doe " as the direct object would return "jdoe@example.com" jens@17: - (void) GetURL:(NSString *)x; // Opens a mailto URL. jens@17: - (void) importMailMailboxAt:(NSString *)at; // Imports a mailbox in Mail's mbox format. jens@17: - (void) mailto:(NSString *)x; // Opens a mailto URL. jens@17: - (void) performMailActionWithMessages:(NSArray *)x inMailboxes:(MailMailbox *)inMailboxes forRule:(MailRule *)forRule; // Script handler invoked by rules and menus that execute AppleScripts. The direct parameter of this handler is a list of messages being acted upon. jens@17: - (void) synchronizeWith:(MailAccount *)with; // Command to trigger synchronizing of an IMAP account with the server. jens@17: jens@17: @end jens@17: jens@17: // A color. jens@17: @interface MailColor : SBObject jens@17: jens@17: - (void) open; // Open an object. jens@17: - (void) print; // Print an object. jens@17: - (void) closeSaving:(MailSavo)saving savingIn:(NSURL *)savingIn; // Close an object. jens@17: - (void) delete; // Delete an object. jens@17: - (void) duplicateTo:(SBObject *)to; // Copy object(s) and put the copies at a new location. jens@17: - (BOOL) exists; // Verify if an object exists. jens@17: - (void) moveTo:(SBObject *)to; // Move object(s) to a new location. jens@17: - (void) saveIn:(NSString *)in_ as:(NSString *)as; // Save an object. jens@17: jens@17: @end jens@17: jens@17: // A document. jens@17: @interface MailDocument : SBObject jens@17: jens@17: @property (copy) NSString *path; // The document's path. jens@17: @property (readonly) BOOL modified; // Has the document been modified since the last save? jens@17: @property (copy) NSString *name; // The document's name. jens@17: jens@17: - (void) open; // Open an object. jens@17: - (void) print; // Print an object. jens@17: - (void) closeSaving:(MailSavo)saving savingIn:(NSURL *)savingIn; // Close an object. jens@17: - (void) delete; // Delete an object. jens@17: - (void) duplicateTo:(SBObject *)to; // Copy object(s) and put the copies at a new location. jens@17: - (BOOL) exists; // Verify if an object exists. jens@17: - (void) moveTo:(SBObject *)to; // Move object(s) to a new location. jens@17: - (void) saveIn:(NSString *)in_ as:(NSString *)as; // Save an object. jens@17: jens@17: @end jens@17: jens@17: // A window. jens@17: @interface MailWindow : SBObject jens@17: jens@17: @property (copy) NSString *name; // The full title of the window. jens@17: - (NSInteger) id; // The unique identifier of the window. jens@17: @property NSRect bounds; // The bounding rectangle of the window. jens@17: @property (readonly) BOOL closeable; // Whether the window has a close box. jens@17: @property (readonly) BOOL titled; // Whether the window has a title bar. jens@17: @property NSInteger index; // The index of the window in the back-to-front window ordering. jens@17: @property (readonly) BOOL floating; // Whether the window floats. jens@17: @property (readonly) BOOL miniaturizable; // Whether the window can be miniaturized. jens@17: @property BOOL miniaturized; // Whether the window is currently miniaturized. jens@17: @property (readonly) BOOL modal; // Whether the window is the application's current modal window. jens@17: @property (readonly) BOOL resizable; // Whether the window can be resized. jens@17: @property BOOL visible; // Whether the window is currently visible. jens@17: @property (readonly) BOOL zoomable; // Whether the window can be zoomed. jens@17: @property BOOL zoomed; // Whether the window is currently zoomed. jens@17: jens@17: - (void) open; // Open an object. jens@17: - (void) print; // Print an object. jens@17: - (void) closeSaving:(MailSavo)saving savingIn:(NSURL *)savingIn; // Close an object. jens@17: - (void) delete; // Delete an object. jens@17: - (void) duplicateTo:(SBObject *)to; // Copy object(s) and put the copies at a new location. jens@17: - (BOOL) exists; // Verify if an object exists. jens@17: - (void) moveTo:(SBObject *)to; // Move object(s) to a new location. jens@17: - (void) saveIn:(NSString *)in_ as:(NSString *)as; // Save an object. jens@17: jens@17: @end jens@17: jens@17: jens@17: jens@17: /* jens@17: * Text Suite jens@17: */ jens@17: jens@17: // Rich (styled) text jens@17: @interface MailText : SBObject jens@17: jens@17: - (SBElementArray *) paragraphs; jens@17: - (SBElementArray *) words; jens@17: - (SBElementArray *) characters; jens@17: - (SBElementArray *) attributeRuns; jens@17: - (SBElementArray *) attachments; jens@17: jens@17: @property (copy) NSColor *color; // The color of the first character. jens@17: @property (copy) NSString *font; // The name of the font of the first character. jens@17: @property (copy) NSNumber *size; // The size in points of the first character. jens@17: jens@17: - (void) open; // Open an object. jens@17: - (void) print; // Print an object. jens@17: - (void) closeSaving:(MailSavo)saving savingIn:(NSURL *)savingIn; // Close an object. jens@17: - (void) delete; // Delete an object. jens@17: - (void) duplicateTo:(SBObject *)to; // Copy object(s) and put the copies at a new location. jens@17: - (BOOL) exists; // Verify if an object exists. jens@17: - (void) moveTo:(SBObject *)to; // Move object(s) to a new location. jens@17: - (void) saveIn:(NSString *)in_ as:(NSString *)as; // Save an object. jens@17: - (NSString *) extractNameFrom; // Command to get the full name out of a fully specified email address. E.g. Calling this with "John Doe " as the direct object would return "John Doe" jens@17: - (NSString *) extractAddressFrom; // Command to get just the email address of a fully specified email address. E.g. Calling this with "John Doe " as the direct object would return "jdoe@example.com" jens@17: - (void) GetURL; // Opens a mailto URL. jens@17: - (void) mailto; // Opens a mailto URL. jens@17: jens@17: @end jens@17: jens@17: // Represents an inline text attachment. This class is used mainly for make commands. jens@17: @interface MailAttachment : MailText jens@17: jens@17: @property (copy) NSString *fileName; // The path to the file for the attachment jens@17: jens@17: jens@17: @end jens@17: jens@17: // This subdivides the text into paragraphs. jens@17: @interface MailParagraph : MailText jens@17: jens@17: jens@17: @end jens@17: jens@17: // This subdivides the text into words. jens@17: @interface MailWord : MailText jens@17: jens@17: jens@17: @end jens@17: jens@17: // This subdivides the text into characters. jens@17: @interface MailCharacter : MailText jens@17: jens@17: jens@17: @end jens@17: jens@17: // This subdivides the text into chunks that all have the same attributes. jens@17: @interface MailAttributeRun : MailText jens@17: jens@17: jens@17: @end jens@17: jens@17: jens@17: jens@17: /* jens@17: * Mail jens@17: */ jens@17: jens@17: // A new email message jens@17: @interface MailOutgoingMessage : MailItem jens@17: jens@17: - (SBElementArray *) bccRecipients; jens@17: - (SBElementArray *) ccRecipients; jens@17: - (SBElementArray *) recipients; jens@17: - (SBElementArray *) toRecipients; jens@17: jens@17: @property (copy) NSString *sender; // The sender of the message jens@17: @property (copy) NSString *subject; // The subject of the message jens@17: @property (copy) MailText *content; // The contents of the message jens@17: @property BOOL visible; // Controls whether the message window is shown on the screen. The default is false jens@17: @property (copy) MailSignature *messageSignature; // The signature of the message jens@17: - (NSInteger) id; // The unique identifier of the message jens@17: jens@17: - (BOOL) send; // Sends a message. jens@17: jens@17: @end jens@17: jens@17: // LDAP servers for use in type completion in Mail jens@17: @interface MailLdapServer : MailItem jens@17: jens@17: @property BOOL enabled; // Indicates whether this LDAP server will be used for type completion in Mail jens@17: @property (copy) NSString *name; // Name of LDAP server configuration to be displayed in Composing preferences jens@17: @property NSInteger port; // Port number for the LDAP server (default is 389) jens@17: @property MailLdas scope; // Scope setting for the LDAP server jens@17: @property (copy) NSString *searchBase; // Search base for this LDAP server (not required by all LDAP servers) jens@17: @property (copy) NSString *hostName; // Internet address (myldapserver.company.com) for LDAP server jens@17: jens@17: jens@17: @end jens@17: jens@17: // Mail's top level scripting object. jens@17: @interface MailApplication (Mail) jens@17: jens@17: - (SBElementArray *) accounts; jens@17: - (SBElementArray *) outgoingMessages; jens@17: - (SBElementArray *) smtpServers; jens@17: - (SBElementArray *) MacAccounts; jens@17: - (SBElementArray *) imapAccounts; jens@17: - (SBElementArray *) ldapServers; jens@17: - (SBElementArray *) mailboxes; jens@17: - (SBElementArray *) messageViewers; jens@17: - (SBElementArray *) popAccounts; jens@17: - (SBElementArray *) rules; jens@17: - (SBElementArray *) signatures; jens@17: jens@17: @property (copy, readonly) NSString *version; // The version of the application. jens@17: @property BOOL alwaysBccMyself; // Indicates whether you will be included in the Bcc: field of messages which you are composing jens@17: @property BOOL alwaysCcMyself; // Indicates whether you will be included in the Cc: field of messages which you are composing jens@17: @property (copy, readonly) NSArray *selection; // List of messages that the user has selected jens@17: @property (copy, readonly) NSString *applicationVersion; // The build number for the Mail application bundle jens@17: @property NSInteger fetchInterval; // The interval (in minutes) between automatic fetches of new mail jens@17: @property (readonly) NSInteger backgroundActivityCount; // Number of background activities currently running in Mail, according to the Activity Viewer jens@17: @property BOOL chooseSignatureWhenComposing; // Indicates whether user can choose a signature directly in a new compose window jens@17: @property BOOL colorQuotedText; // Indicates whether quoted text should be colored jens@17: @property MailEdmf defaultMessageFormat; // Default format for messages being composed or message replies jens@17: @property BOOL downloadHtmlAttachments; // Indicates whether images and attachments in HTML messages should be downloaded and displayed jens@17: @property (copy, readonly) MailMailbox *draftsMailbox; // The top level Drafts mailbox jens@17: @property BOOL expandGroupAddresses; // Indicates whether group addresses will be expanded when entered into the address fields of a new compose message jens@17: @property (copy) NSString *fixedWidthFont; // Font for plain text messages, only used if 'use fixed width font' is set to true jens@17: @property double fixedWidthFontSize; // Font size for plain text messages, only used if 'use fixed width font' is set to true jens@17: @property (copy, readonly) NSString *frameworkVersion; // The build number for the Message framework, used by Mail jens@17: @property MailHede headerDetail; // The level of detail shown for headers on incoming messages jens@17: @property (copy, readonly) MailMailbox *inbox; // The top level In mailbox jens@17: @property BOOL includeAllOriginalMessageText; // Indicates whether all of the original message will be quoted or only the text you have selected (if any) jens@17: @property BOOL quoteOriginalMessage; // Indicates whether the text of the original message will be included in replies jens@17: @property BOOL checkSpellingWhileTyping; // Indicates whether spelling will be checked automatically in messages being composed jens@17: @property (copy, readonly) MailMailbox *junkMailbox; // The top level Junk mailbox jens@17: @property MailQqcl levelOneQuotingColor; // Color for quoted text with one level of indentation jens@17: @property MailQqcl levelTwoQuotingColor; // Color for quoted text with two levels of indentation jens@17: @property MailQqcl levelThreeQuotingColor; // Color for quoted text with three levels of indentation jens@17: @property (copy) NSString *messageFont; // Font for messages (proportional font) jens@17: @property double messageFontSize; // Font size for messages (proportional font) jens@17: @property (copy) NSString *messageListFont; // Font for message list jens@17: @property double messageListFontSize; // Font size for message list jens@17: @property (copy) NSString *newMailSound; // Name of new mail sound or 'None' if no sound is selected jens@17: @property (copy, readonly) MailMailbox *outbox; // The top level Out mailbox jens@17: @property BOOL shouldPlayOtherMailSounds; // Indicates whether sounds will be played for various things such as when a messages is sent or if no mail is found when manually checking for new mail or if there is a fetch error jens@17: @property BOOL sameReplyFormat; // Indicates whether replies will be in the same text format as the message to which you are replying jens@17: @property (copy) NSString *selectedSignature; // Name of current selected signature (or 'randomly', 'sequentially', or 'none') jens@17: @property (copy, readonly) MailMailbox *sentMailbox; // The top level Sent mailbox jens@17: @property BOOL fetchesAutomatically; // Indicates whether mail will automatically be fetched at a specific interval jens@17: @property BOOL highlightSelectedThread; // Indicates whether threads should be highlighted in the Mail viewer window jens@17: @property BOOL showOnlineBuddyStatus; // Indicates whether Mail will show online buddy status jens@17: @property (copy, readonly) MailMailbox *trashMailbox; // The top level Trash mailbox jens@17: @property BOOL useAddressCompletion; // Indicates whether network directories (LDAP) and Address Book will be used for address completion jens@17: @property BOOL useFixedWidthFont; // Should fixed-width font be used for plain text messages? jens@17: @property (copy, readonly) NSString *primaryEmail; // The user's primary email address jens@17: jens@17: @end jens@17: jens@17: // Represents the object responsible for managing a viewer window jens@17: @interface MailMessageViewer : MailItem jens@17: jens@17: - (SBElementArray *) messages; jens@17: jens@17: @property (copy, readonly) MailMailbox *draftsMailbox; // The top level Drafts mailbox jens@17: @property (copy, readonly) MailMailbox *inbox; // The top level In mailbox jens@17: @property (copy, readonly) MailMailbox *junkMailbox; // The top level Junk mailbox jens@17: @property (copy, readonly) MailMailbox *outbox; // The top level Out mailbox jens@17: @property (copy, readonly) MailMailbox *sentMailbox; // The top level Sent mailbox jens@17: @property (copy, readonly) MailMailbox *trashMailbox; // The top level Trash mailbox jens@17: @property MailMvcl sortColumn; // The column that is currently sorted in the viewer jens@17: @property BOOL sortedAscending; // Whether the viewer is sorted ascending or not jens@17: @property BOOL mailboxListVisible; // Controls whether the list of mailboxes is visible or not jens@17: @property BOOL previewPaneIsVisible; // Controls whether the preview pane of the message viewer window is visible or not jens@17: @property MailMvcl visibleColumns; // List of columns that are visible. The subject column and the message status column will always be visible jens@17: - (NSInteger) id; // The unique identifier of the message viewer jens@17: @property (copy) NSArray *visibleMessages; // List of messages currently being displayed in the viewer jens@17: @property (copy) NSArray *selectedMessages; // List of messages currently selected jens@17: @property (copy) NSArray *selectedMailboxes; // List of mailboxes currently selected in the list of mailboxes jens@17: @property (copy) MailWindow *window; // The window for the message viewer jens@17: jens@17: jens@17: @end jens@17: jens@17: // Email signatures jens@17: @interface MailSignature : MailItem jens@17: jens@17: @property (copy) NSString *content; // Contents of email signature. If there is a version with fonts and/or styles, that will be returned over the plain text version jens@17: @property (copy) NSString *name; // Name of the signature jens@17: jens@17: jens@17: @end jens@17: jens@17: jens@17: jens@17: /* jens@17: * Message jens@17: */ jens@17: jens@17: // An email message jens@17: @interface MailMessage : MailItem jens@17: jens@17: - (SBElementArray *) bccRecipients; jens@17: - (SBElementArray *) ccRecipients; jens@17: - (SBElementArray *) recipients; jens@17: - (SBElementArray *) toRecipients; jens@17: - (SBElementArray *) headers; jens@17: - (SBElementArray *) mailAttachments; jens@17: jens@17: - (NSInteger) id; // The unique identifier of the message. jens@17: @property (copy, readonly) NSString *allHeaders; // All the headers of the message jens@17: @property MailCclr backgroundColor; // The background color of the message jens@17: @property (copy) MailMailbox *mailbox; // The mailbox in which this message is filed jens@17: @property (copy) MailText *content; // Contents of an email message jens@17: @property (copy, readonly) NSDate *dateReceived; // The date a message was received jens@17: @property (copy, readonly) NSDate *dateSent; // The date a message was sent jens@17: @property BOOL deletedStatus; // Indicates whether the message is deleted or not jens@17: @property BOOL flaggedStatus; // Indicates whether the message is flagged or not jens@17: @property BOOL junkMailStatus; // Indicates whether the message has been marked junk or evaluated to be junk by the junk mail filter. jens@17: @property BOOL readStatus; // Indicates whether the message is read or not jens@17: @property (copy, readonly) NSString *messageId; // The unique message ID string jens@17: @property (copy, readonly) NSString *source; // Raw source of the message jens@17: @property (copy) NSString *replyTo; // The address that replies should be sent to jens@17: @property NSInteger messageSize; // The size (in bytes) of a message jens@17: @property (copy) NSString *sender; // The sender of the message jens@17: @property (copy) NSString *subject; // The subject of the message jens@17: @property BOOL wasForwarded; // Indicates whether the message was forwarded or not jens@17: @property BOOL wasRedirected; // Indicates whether the message was redirected or not jens@17: @property BOOL wasRepliedTo; // Indicates whether the message was replied to or not jens@17: jens@17: - (void) bounce; // Bounces a message back to the sender. jens@17: - (void) delete; // Delete a message. jens@17: - (void) duplicateTo:(MailMailbox *)to; // Copy message(s) and put the copies in the specified mailbox. jens@17: - (MailOutgoingMessage *) forwardOpeningWindow:(BOOL)openingWindow; // Creates a forwarded message. jens@17: - (void) moveTo:(MailMailbox *)to; // Move message(s) to a new mailbox. jens@17: - (MailOutgoingMessage *) redirectOpeningWindow:(BOOL)openingWindow; // Creates a redirected message. jens@17: - (MailOutgoingMessage *) replyOpeningWindow:(BOOL)openingWindow replyToAll:(BOOL)replyToAll; // Creates a reply message. jens@17: jens@17: @end jens@17: jens@17: // A Mail account for receiving messages (IMAP/POP/.Mac). To create a new receiving account, use the 'pop account', 'imap account', and 'Mac account' objects jens@17: @interface MailAccount : MailItem jens@17: jens@17: - (SBElementArray *) mailboxes; jens@17: jens@17: @property (copy) MailSmtpServer *deliveryAccount; // The delivery account used when sending mail from this account jens@17: @property (copy) NSString *name; // The name of an account jens@17: @property (copy) NSString *password; // Password for this account. Can be set, but not read via scripting jens@17: @property MailExut authentication; // Preferred authentication scheme for account jens@17: @property (readonly) MailEtoc accountType; // The type of an account jens@17: @property (copy) NSArray *emailAddresses; // The list of email addresses configured for an account jens@17: @property (copy) NSString *fullName; // The users full name configured for an account jens@17: @property NSInteger emptyJunkMessagesFrequency; // Number of days before junk messages are deleted (0 = delete on quit, -1 = never delete) jens@17: @property NSInteger emptySentMessagesFrequency; // Number of days before archived sent messages are deleted (0 = delete on quit, -1 = never delete) jens@17: @property NSInteger emptyTrashFrequency; // Number of days before messages in the trash are permanently deleted (0 = delete on quit, -1 = never delete) jens@17: @property BOOL emptyJunkMessagesOnQuit; // Indicates whether the messages in the junk messages mailboxes will be deleted on quit jens@17: @property BOOL emptySentMessagesOnQuit; // Indicates whether the messages in the sent messages mailboxes will be deleted on quit jens@17: @property BOOL emptyTrashOnQuit; // Indicates whether the messages in deleted messages mailboxes will be permanently deleted on quit jens@17: @property BOOL enabled; // Indicates whether the account is enabled or not jens@17: @property (copy) NSString *userName; // The user name used to connect to an account jens@17: @property (copy, readonly) NSURL *accountDirectory; // The directory where the account stores things on disk jens@17: @property NSInteger port; // The port used to connect to an account jens@17: @property (copy) NSString *serverName; // The host name used to connect to an account jens@17: @property BOOL includeWhenGettingNewMail; // Indicates whether the account will be included when getting new mail jens@17: @property BOOL moveDeletedMessagesToTrash; // Indicates whether messages that are deleted will be moved to the trash mailbox jens@17: @property BOOL usesSsl; // Indicates whether SSL is enabled for this receiving account jens@17: jens@17: jens@17: @end jens@17: jens@17: // An IMAP email account jens@17: @interface MailImapAccount : MailAccount jens@17: jens@17: @property BOOL compactMailboxesWhenClosing; // Indicates whether an IMAP mailbox is automatically compacted when you quit Mail or switch to another mailbox jens@17: @property MailE9xp messageCaching; // Message caching setting for this account jens@17: @property BOOL storeDraftsOnServer; // Indicates whether drafts will be stored on the IMAP server jens@17: @property BOOL storeJunkMailOnServer; // Indicates whether junk mail will be stored on the IMAP server jens@17: @property BOOL storeSentMessagesOnServer; // Indicates whether sent messages will be stored on the IMAP server jens@17: @property BOOL storeDeletedMessagesOnServer; // Indicates whether deleted messages will be stored on the IMAP server jens@17: jens@17: jens@17: @end jens@17: jens@17: // A .Mac email account jens@17: @interface MailMacAccount : MailImapAccount jens@17: jens@17: jens@17: @end jens@17: jens@17: // A POP email account jens@17: @interface MailPopAccount : MailAccount jens@17: jens@17: @property NSInteger bigMessageWarningSize; // If message size (in bytes) is over this amount, Mail will prompt you asking whether you want to download the message (-1 = do not prompt) jens@17: @property NSInteger delayedMessageDeletionInterval; // Number of days before messages that have been downloaded will be deleted from the server (0 = delete immediately after downloading) jens@17: @property BOOL deleteMailOnServer; // Indicates whether POP account deletes messages on the server after downloading jens@17: @property BOOL deleteMessagesWhenMovedFromInbox; // Indicates whether messages will be deleted from the server when moved from your POP inbox jens@17: jens@17: jens@17: @end jens@17: jens@17: // An SMTP account (for sending email) jens@17: @interface MailSmtpServer : MailItem jens@17: jens@17: @property (copy, readonly) NSString *name; // The name of an account jens@17: @property (copy) NSString *password; // Password for this account. Can be set, but not read via scripting jens@17: @property (readonly) MailEtoc accountType; // The type of an account jens@17: @property MailExut authentication; // Preferred authentication scheme for account jens@17: @property BOOL enabled; // Indicates whether the account is enabled or not jens@17: @property (copy) NSString *userName; // The user name used to connect to an account jens@17: @property NSInteger port; // The port used to connect to an account jens@17: @property (copy) NSString *serverName; // The host name used to connect to an account jens@17: @property BOOL usesSsl; // Indicates whether SSL is enabled for this receiving account jens@17: jens@17: jens@17: @end jens@17: jens@17: // A mailbox that holds messages jens@17: @interface MailMailbox : MailItem jens@17: jens@17: - (SBElementArray *) mailboxes; jens@17: - (SBElementArray *) messages; jens@17: jens@17: @property (copy) NSString *name; // The name of a mailbox jens@17: @property (readonly) NSInteger unreadCount; // The number of unread messages in the mailbox jens@17: @property (copy, readonly) MailAccount *account; jens@17: @property (copy, readonly) MailMailbox *container; jens@17: jens@17: jens@17: @end jens@17: jens@17: // Class for message rules jens@17: @interface MailRule : MailItem jens@17: jens@17: - (SBElementArray *) ruleConditions; jens@17: jens@17: @property MailCclr colorMessage; // If rule matches, apply this color jens@17: @property BOOL deleteMessage; // If rule matches, delete message jens@17: @property (copy) NSString *forwardText; // If rule matches, prepend this text to the forwarded message. Set to empty string to include no prepended text jens@17: @property (copy) NSString *forwardMessage; // If rule matches, forward message to this address, or multiple addresses, separated by commas. Set to empty string to disable this action jens@17: @property BOOL markFlagged; // If rule matches, mark message as flagged jens@17: @property BOOL markRead; // If rule matches, mark message as read jens@17: @property (copy) NSString *playSound; // If rule matches, play this sound (specify name of sound or path to sound) jens@17: @property (copy) NSArray *redirectMessage; // If rule matches, redirect message to this address or multiple addresses, separate by commas. Set to empty string to disable this action jens@17: @property (copy) NSString *replyText; // If rule matches, reply to message and prepend with this text. Set to empty string to disable this action jens@17: @property (copy) NSURL *runScript; // If rule matches, run this AppleScript. Set to POSIX path of compiled AppleScript file. Set to empty string to disable this action jens@17: @property BOOL allConditionsMustBeMet; // Indicates whether all conditions must be met for rule to execute jens@17: @property (copy) MailMailbox *copyMessage; // If rule matches, copy to this mailbox jens@17: @property (copy) MailMailbox *moveMessage; // If rule matches, move to this mailbox jens@17: @property BOOL highlightTextUsingColor; // Indicates whether the color will be used to highlight the text or background of a message in the message list jens@17: @property BOOL enabled; // Indicates whether the rule is enabled jens@17: @property (copy) NSString *name; // Name of rule jens@17: @property BOOL shouldCopyMessage; // Indicates whether the rule has a copy action jens@17: @property BOOL shouldMoveMessage; // Indicates whether the rule has a transfer action jens@17: @property BOOL stopEvaluatingRules; // If rule matches, stop rule evaluation for this message jens@17: jens@17: jens@17: @end jens@17: jens@17: // Class for conditions that can be attached to a single rule jens@17: @interface MailRuleCondition : MailItem jens@17: jens@17: @property (copy) NSString *expression; // Rule expression field jens@17: @property (copy) NSString *header; // Rule header key jens@17: @property MailEnrq qualifier; // Rule qualifier jens@17: @property MailErut ruleType; // Rule type jens@17: jens@17: jens@17: @end jens@17: jens@17: // An email recipient jens@17: @interface MailRecipient : MailItem jens@17: jens@17: @property (copy) NSString *address; // The recipients email address jens@17: @property (copy) NSString *name; // The name used for display jens@17: jens@17: jens@17: @end jens@17: jens@17: // An email recipient in the Bcc: field jens@17: @interface MailBccRecipient : MailRecipient jens@17: jens@17: jens@17: @end jens@17: jens@17: // An email recipient in the Cc: field jens@17: @interface MailCcRecipient : MailRecipient jens@17: jens@17: jens@17: @end jens@17: jens@17: // An email recipient in the To: field jens@17: @interface MailToRecipient : MailRecipient jens@17: jens@17: jens@17: @end jens@17: jens@17: // A mailbox that contains other mailboxes. jens@17: @interface MailContainer : MailMailbox jens@17: jens@17: jens@17: @end jens@17: jens@17: // A header value for a message. E.g. To, Subject, From. jens@17: @interface MailHeader : MailItem jens@17: jens@17: @property (copy) NSString *content; // Contents of the header jens@17: @property (copy) NSString *name; // Name of the header value jens@17: jens@17: jens@17: @end jens@17: jens@17: // A file attached to a received message. jens@17: @interface MailMailAttachment : MailItem jens@17: jens@17: @property (copy, readonly) NSString *name; // Name of the attachment jens@17: @property (copy, readonly) NSString *MIMEType; // MIME type of the attachment E.g. text/plain. jens@17: @property (readonly) NSInteger fileSize; // Approximate size in bytes. jens@17: @property (readonly) BOOL downloaded; // Indicates whether the attachment has been downloaded. jens@17: - (NSString *) id; // The unique identifier of the attachment. jens@17: jens@17: jens@17: @end jens@17: