Changes to config-file structure.
5 #import <AppKit/AppKit.h>
6 #import <ScriptingBridge/ScriptingBridge.h>
9 @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;
12 MailSavoYes = 'yes ' /* Save the file. */,
13 MailSavoNo = 'no ' /* Do not save the file. */,
14 MailSavoAsk = 'ask ' /* Ask the user whether or not to save the file. */
18 MailEdmfPlainText = 'dmpt' /* Plain Text */,
19 MailEdmfRichText = 'dmrt' /* Rich Text */
23 MailHedeAll = 'hdal' /* All */,
24 MailHedeCustom = 'hdcu' /* Custom */,
25 MailHedeDefault = 'hdde' /* Default */,
26 MailHedeNoHeaders = 'hdnn' /* No headers */
30 MailLdasBase = 'lsba' /* LDAP scope of 'Base' */,
31 MailLdasOneLevel = 'lsol' /* LDAP scope of 'One Level' */,
32 MailLdasSubtree = 'lsst' /* LDAP scope of 'Subtree' */
36 MailQqclBlue = 'ccbl' /* Blue */,
37 MailQqclGreen = 'ccgr' /* Green */,
38 MailQqclOrange = 'ccor' /* Orange */,
39 MailQqclOther = 'ccot' /* Other */,
40 MailQqclPurple = 'ccpu' /* Purple */,
41 MailQqclRed = 'ccre' /* Red */,
42 MailQqclYellow = 'ccye' /* Yellow */
46 MailMvclAttachmentsColumn = 'ecat' /* Column containing the number of attachments a message contains */,
47 MailMvclBuddyAvailabilityColumn = 'ecba' /* Column indicating whether the sender of a message is online or not */,
48 MailMvclMessageColor = 'eccl' /* Used to indicate sorting should be done by color */,
49 MailMvclDateReceivedColumn = 'ecdr' /* Column containing the date a message was received */,
50 MailMvclDateSentColumn = 'ecds' /* Column containing the date a message was sent */,
51 MailMvclFlagsColumn = 'ecfl' /* Column containing the flags of a message */,
52 MailMvclFromColumn = 'ecfr' /* Column containing the sender's name */,
53 MailMvclMailboxColumn = 'ecmb' /* Column containing the name of the mailbox or account a message is in */,
54 MailMvclMessageStatusColumn = 'ecms' /* Column indicating a messages status (read, unread, replied to, forwarded, etc) */,
55 MailMvclNumberColumn = 'ecnm' /* Column containing the number of a message in a mailbox */,
56 MailMvclSizeColumn = 'ecsz' /* Column containing the size of a message */,
57 MailMvclSubjectColumn = 'ecsu' /* Column containing the subject of a message */,
58 MailMvclToColumn = 'ecto' /* Column containing the recipients of a message */
62 MailExutPassword = 'axct' /* Clear text password */,
63 MailExutApop = 'aapo' /* APOP */,
64 MailExutKerberos5 = 'axk5' /* Kerberos 5 */,
65 MailExutNtlm = 'axnt' /* NTLM */,
66 MailExutMd5 = 'axmd' /* MD5 */,
67 MailExutNone = 'ccno' /* None */
71 MailCclrBlue = 'ccbl' /* Blue */,
72 MailCclrGray = 'ccgy' /* Gray */,
73 MailCclrGreen = 'ccgr' /* Green */,
74 MailCclrNone = 'ccno' /* None */,
75 MailCclrOrange = 'ccor' /* Orange */,
76 MailCclrOther = 'ccot' /* Other */,
77 MailCclrPurple = 'ccpu' /* Purple */,
78 MailCclrRed = 'ccre' /* Red */,
79 MailCclrYellow = 'ccye' /* Yellow */
83 MailE9xpAllMessagesAndTheirAttachments = 'x9al' /* All messages and their attachments */,
84 MailE9xpAllMessagesButOmitAttachments = 'x9bo' /* All messages but omit attachments */,
85 MailE9xpDoNotKeepCopiesOfAnyMessages = 'x9no' /* Do not keep copies of any messages */,
86 MailE9xpOnlyMessagesIHaveRead = 'x9wr' /* Only messages I have read */
90 MailEnrqBeginsWithValue = 'rqbw' /* Begins with value */,
91 MailEnrqDoesContainValue = 'rqco' /* Does contain value */,
92 MailEnrqDoesNotContainValue = 'rqdn' /* Does not contain value */,
93 MailEnrqEndsWithValue = 'rqew' /* Ends with value */,
94 MailEnrqEqualToValue = 'rqie' /* Equal to value */,
95 MailEnrqLessThanValue = 'rqlt' /* Less than value */,
96 MailEnrqGreaterThanValue = 'rqgt' /* Greater than value */,
97 MailEnrqNone = 'rqno' /* Indicates no qualifier is applicable */
101 MailErutAccount = 'tacc' /* Account */,
102 MailErutAnyRecipient = 'tanr' /* Any recipient */,
103 MailErutCcHeader = 'tccc' /* Cc header */,
104 MailErutMatchesEveryMessage = 'tevm' /* Every message */,
105 MailErutFromHeader = 'tfro' /* From header */,
106 MailErutHeaderKey = 'thdk' /* An arbitrary header key */,
107 MailErutMessageContent = 'tmec' /* Message content */,
108 MailErutMessageIsJunkMail = 'tmij' /* Message is junk mail */,
109 MailErutSenderIsInMyAddressBook = 'tsii' /* Sender is in my address book */,
110 MailErutSenderIsMemberOfGroup = 'tsim' /* Sender is member of group */,
111 MailErutSenderIsNotInMyAddressBook = 'tsin' /* Sender is not in my address book */,
112 MailErutSenderIsNotMemberOfGroup = 'tsig' /* Sender is not member of group */,
113 MailErutSubjectHeader = 'tsub' /* Subject header */,
114 MailErutToHeader = 'ttoo' /* To header */,
115 MailErutToOrCcHeader = 'ttoc' /* To or Cc header */
119 MailEtocImap = 'etim' /* IMAP */,
120 MailEtocPop = 'etpo' /* POP */,
121 MailEtocSmtp = 'etsm' /* SMTP */,
122 MailEtocMac = 'etit' /* .Mac */
131 // Abstract object provides a base class for scripting classes. It is never used directly.
132 @interface MailItem : SBObject
134 @property (copy) NSDictionary *properties; // All of the object's properties.
136 - (void) open; // Open an object.
137 - (void) print; // Print an object.
138 - (void) closeSaving:(MailSavo)saving savingIn:(NSURL *)savingIn; // Close an object.
139 - (void) delete; // Delete an object.
140 - (void) duplicateTo:(SBObject *)to; // Copy object(s) and put the copies at a new location.
141 - (BOOL) exists; // Verify if an object exists.
142 - (void) moveTo:(SBObject *)to; // Move object(s) to a new location.
143 - (void) saveIn:(NSString *)in_ as:(NSString *)as; // Save an object.
147 // An application's top level scripting object.
148 @interface MailApplication : SBApplication
149 + (MailApplication *) application;
151 - (SBElementArray *) documents;
152 - (SBElementArray *) windows;
154 @property (copy, readonly) NSString *name; // The name of the application.
155 @property (readonly) BOOL frontmost; // Is this the frontmost (active) application?
156 @property (copy, readonly) NSString *version; // The version of the application.
158 - (void) quitSaving:(MailSavo)saving; // Quit an application.
159 - (void) checkForNewMailFor:(MailAccount *)for_; // Triggers a check for email.
160 - (NSString *) extractNameFrom:(NSString *)x; // Command to get the full name out of a fully specified email address. E.g. Calling this with "John Doe <jdoe@example.com>" as the direct object would return "John Doe"
161 - (NSString *) extractAddressFrom:(NSString *)x; // Command to get just the email address of a fully specified email address. E.g. Calling this with "John Doe <jdoe@example.com>" as the direct object would return "jdoe@example.com"
162 - (void) GetURL:(NSString *)x; // Opens a mailto URL.
163 - (void) importMailMailboxAt:(NSString *)at; // Imports a mailbox in Mail's mbox format.
164 - (void) mailto:(NSString *)x; // Opens a mailto URL.
165 - (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.
166 - (void) synchronizeWith:(MailAccount *)with; // Command to trigger synchronizing of an IMAP account with the server.
171 @interface MailColor : SBObject
173 - (void) open; // Open an object.
174 - (void) print; // Print an object.
175 - (void) closeSaving:(MailSavo)saving savingIn:(NSURL *)savingIn; // Close an object.
176 - (void) delete; // Delete an object.
177 - (void) duplicateTo:(SBObject *)to; // Copy object(s) and put the copies at a new location.
178 - (BOOL) exists; // Verify if an object exists.
179 - (void) moveTo:(SBObject *)to; // Move object(s) to a new location.
180 - (void) saveIn:(NSString *)in_ as:(NSString *)as; // Save an object.
185 @interface MailDocument : SBObject
187 @property (copy) NSString *path; // The document's path.
188 @property (readonly) BOOL modified; // Has the document been modified since the last save?
189 @property (copy) NSString *name; // The document's name.
191 - (void) open; // Open an object.
192 - (void) print; // Print an object.
193 - (void) closeSaving:(MailSavo)saving savingIn:(NSURL *)savingIn; // Close an object.
194 - (void) delete; // Delete an object.
195 - (void) duplicateTo:(SBObject *)to; // Copy object(s) and put the copies at a new location.
196 - (BOOL) exists; // Verify if an object exists.
197 - (void) moveTo:(SBObject *)to; // Move object(s) to a new location.
198 - (void) saveIn:(NSString *)in_ as:(NSString *)as; // Save an object.
203 @interface MailWindow : SBObject
205 @property (copy) NSString *name; // The full title of the window.
206 - (NSInteger) id; // The unique identifier of the window.
207 @property NSRect bounds; // The bounding rectangle of the window.
208 @property (readonly) BOOL closeable; // Whether the window has a close box.
209 @property (readonly) BOOL titled; // Whether the window has a title bar.
210 @property NSInteger index; // The index of the window in the back-to-front window ordering.
211 @property (readonly) BOOL floating; // Whether the window floats.
212 @property (readonly) BOOL miniaturizable; // Whether the window can be miniaturized.
213 @property BOOL miniaturized; // Whether the window is currently miniaturized.
214 @property (readonly) BOOL modal; // Whether the window is the application's current modal window.
215 @property (readonly) BOOL resizable; // Whether the window can be resized.
216 @property BOOL visible; // Whether the window is currently visible.
217 @property (readonly) BOOL zoomable; // Whether the window can be zoomed.
218 @property BOOL zoomed; // Whether the window is currently zoomed.
220 - (void) open; // Open an object.
221 - (void) print; // Print an object.
222 - (void) closeSaving:(MailSavo)saving savingIn:(NSURL *)savingIn; // Close an object.
223 - (void) delete; // Delete an object.
224 - (void) duplicateTo:(SBObject *)to; // Copy object(s) and put the copies at a new location.
225 - (BOOL) exists; // Verify if an object exists.
226 - (void) moveTo:(SBObject *)to; // Move object(s) to a new location.
227 - (void) saveIn:(NSString *)in_ as:(NSString *)as; // Save an object.
237 // Rich (styled) text
238 @interface MailText : SBObject
240 - (SBElementArray *) paragraphs;
241 - (SBElementArray *) words;
242 - (SBElementArray *) characters;
243 - (SBElementArray *) attributeRuns;
244 - (SBElementArray *) attachments;
246 @property (copy) NSColor *color; // The color of the first character.
247 @property (copy) NSString *font; // The name of the font of the first character.
248 @property (copy) NSNumber *size; // The size in points of the first character.
250 - (void) open; // Open an object.
251 - (void) print; // Print an object.
252 - (void) closeSaving:(MailSavo)saving savingIn:(NSURL *)savingIn; // Close an object.
253 - (void) delete; // Delete an object.
254 - (void) duplicateTo:(SBObject *)to; // Copy object(s) and put the copies at a new location.
255 - (BOOL) exists; // Verify if an object exists.
256 - (void) moveTo:(SBObject *)to; // Move object(s) to a new location.
257 - (void) saveIn:(NSString *)in_ as:(NSString *)as; // Save an object.
258 - (NSString *) extractNameFrom; // Command to get the full name out of a fully specified email address. E.g. Calling this with "John Doe <jdoe@example.com>" as the direct object would return "John Doe"
259 - (NSString *) extractAddressFrom; // Command to get just the email address of a fully specified email address. E.g. Calling this with "John Doe <jdoe@example.com>" as the direct object would return "jdoe@example.com"
260 - (void) GetURL; // Opens a mailto URL.
261 - (void) mailto; // Opens a mailto URL.
265 // Represents an inline text attachment. This class is used mainly for make commands.
266 @interface MailAttachment : MailText
268 @property (copy) NSString *fileName; // The path to the file for the attachment
273 // This subdivides the text into paragraphs.
274 @interface MailParagraph : MailText
279 // This subdivides the text into words.
280 @interface MailWord : MailText
285 // This subdivides the text into characters.
286 @interface MailCharacter : MailText
291 // This subdivides the text into chunks that all have the same attributes.
292 @interface MailAttributeRun : MailText
303 // A new email message
304 @interface MailOutgoingMessage : MailItem
306 - (SBElementArray *) bccRecipients;
307 - (SBElementArray *) ccRecipients;
308 - (SBElementArray *) recipients;
309 - (SBElementArray *) toRecipients;
311 @property (copy) NSString *sender; // The sender of the message
312 @property (copy) NSString *subject; // The subject of the message
313 @property (copy) MailText *content; // The contents of the message
314 @property BOOL visible; // Controls whether the message window is shown on the screen. The default is false
315 @property (copy) MailSignature *messageSignature; // The signature of the message
316 - (NSInteger) id; // The unique identifier of the message
318 - (BOOL) send; // Sends a message.
322 // LDAP servers for use in type completion in Mail
323 @interface MailLdapServer : MailItem
325 @property BOOL enabled; // Indicates whether this LDAP server will be used for type completion in Mail
326 @property (copy) NSString *name; // Name of LDAP server configuration to be displayed in Composing preferences
327 @property NSInteger port; // Port number for the LDAP server (default is 389)
328 @property MailLdas scope; // Scope setting for the LDAP server
329 @property (copy) NSString *searchBase; // Search base for this LDAP server (not required by all LDAP servers)
330 @property (copy) NSString *hostName; // Internet address (myldapserver.company.com) for LDAP server
335 // Mail's top level scripting object.
336 @interface MailApplication (Mail)
338 - (SBElementArray *) accounts;
339 - (SBElementArray *) outgoingMessages;
340 - (SBElementArray *) smtpServers;
341 - (SBElementArray *) MacAccounts;
342 - (SBElementArray *) imapAccounts;
343 - (SBElementArray *) ldapServers;
344 - (SBElementArray *) mailboxes;
345 - (SBElementArray *) messageViewers;
346 - (SBElementArray *) popAccounts;
347 - (SBElementArray *) rules;
348 - (SBElementArray *) signatures;
350 @property (copy, readonly) NSString *version; // The version of the application.
351 @property BOOL alwaysBccMyself; // Indicates whether you will be included in the Bcc: field of messages which you are composing
352 @property BOOL alwaysCcMyself; // Indicates whether you will be included in the Cc: field of messages which you are composing
353 @property (copy, readonly) NSArray *selection; // List of messages that the user has selected
354 @property (copy, readonly) NSString *applicationVersion; // The build number for the Mail application bundle
355 @property NSInteger fetchInterval; // The interval (in minutes) between automatic fetches of new mail
356 @property (readonly) NSInteger backgroundActivityCount; // Number of background activities currently running in Mail, according to the Activity Viewer
357 @property BOOL chooseSignatureWhenComposing; // Indicates whether user can choose a signature directly in a new compose window
358 @property BOOL colorQuotedText; // Indicates whether quoted text should be colored
359 @property MailEdmf defaultMessageFormat; // Default format for messages being composed or message replies
360 @property BOOL downloadHtmlAttachments; // Indicates whether images and attachments in HTML messages should be downloaded and displayed
361 @property (copy, readonly) MailMailbox *draftsMailbox; // The top level Drafts mailbox
362 @property BOOL expandGroupAddresses; // Indicates whether group addresses will be expanded when entered into the address fields of a new compose message
363 @property (copy) NSString *fixedWidthFont; // Font for plain text messages, only used if 'use fixed width font' is set to true
364 @property double fixedWidthFontSize; // Font size for plain text messages, only used if 'use fixed width font' is set to true
365 @property (copy, readonly) NSString *frameworkVersion; // The build number for the Message framework, used by Mail
366 @property MailHede headerDetail; // The level of detail shown for headers on incoming messages
367 @property (copy, readonly) MailMailbox *inbox; // The top level In mailbox
368 @property BOOL includeAllOriginalMessageText; // Indicates whether all of the original message will be quoted or only the text you have selected (if any)
369 @property BOOL quoteOriginalMessage; // Indicates whether the text of the original message will be included in replies
370 @property BOOL checkSpellingWhileTyping; // Indicates whether spelling will be checked automatically in messages being composed
371 @property (copy, readonly) MailMailbox *junkMailbox; // The top level Junk mailbox
372 @property MailQqcl levelOneQuotingColor; // Color for quoted text with one level of indentation
373 @property MailQqcl levelTwoQuotingColor; // Color for quoted text with two levels of indentation
374 @property MailQqcl levelThreeQuotingColor; // Color for quoted text with three levels of indentation
375 @property (copy) NSString *messageFont; // Font for messages (proportional font)
376 @property double messageFontSize; // Font size for messages (proportional font)
377 @property (copy) NSString *messageListFont; // Font for message list
378 @property double messageListFontSize; // Font size for message list
379 @property (copy) NSString *newMailSound; // Name of new mail sound or 'None' if no sound is selected
380 @property (copy, readonly) MailMailbox *outbox; // The top level Out mailbox
381 @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
382 @property BOOL sameReplyFormat; // Indicates whether replies will be in the same text format as the message to which you are replying
383 @property (copy) NSString *selectedSignature; // Name of current selected signature (or 'randomly', 'sequentially', or 'none')
384 @property (copy, readonly) MailMailbox *sentMailbox; // The top level Sent mailbox
385 @property BOOL fetchesAutomatically; // Indicates whether mail will automatically be fetched at a specific interval
386 @property BOOL highlightSelectedThread; // Indicates whether threads should be highlighted in the Mail viewer window
387 @property BOOL showOnlineBuddyStatus; // Indicates whether Mail will show online buddy status
388 @property (copy, readonly) MailMailbox *trashMailbox; // The top level Trash mailbox
389 @property BOOL useAddressCompletion; // Indicates whether network directories (LDAP) and Address Book will be used for address completion
390 @property BOOL useFixedWidthFont; // Should fixed-width font be used for plain text messages?
391 @property (copy, readonly) NSString *primaryEmail; // The user's primary email address
395 // Represents the object responsible for managing a viewer window
396 @interface MailMessageViewer : MailItem
398 - (SBElementArray *) messages;
400 @property (copy, readonly) MailMailbox *draftsMailbox; // The top level Drafts mailbox
401 @property (copy, readonly) MailMailbox *inbox; // The top level In mailbox
402 @property (copy, readonly) MailMailbox *junkMailbox; // The top level Junk mailbox
403 @property (copy, readonly) MailMailbox *outbox; // The top level Out mailbox
404 @property (copy, readonly) MailMailbox *sentMailbox; // The top level Sent mailbox
405 @property (copy, readonly) MailMailbox *trashMailbox; // The top level Trash mailbox
406 @property MailMvcl sortColumn; // The column that is currently sorted in the viewer
407 @property BOOL sortedAscending; // Whether the viewer is sorted ascending or not
408 @property BOOL mailboxListVisible; // Controls whether the list of mailboxes is visible or not
409 @property BOOL previewPaneIsVisible; // Controls whether the preview pane of the message viewer window is visible or not
410 @property MailMvcl visibleColumns; // List of columns that are visible. The subject column and the message status column will always be visible
411 - (NSInteger) id; // The unique identifier of the message viewer
412 @property (copy) NSArray *visibleMessages; // List of messages currently being displayed in the viewer
413 @property (copy) NSArray *selectedMessages; // List of messages currently selected
414 @property (copy) NSArray *selectedMailboxes; // List of mailboxes currently selected in the list of mailboxes
415 @property (copy) MailWindow *window; // The window for the message viewer
421 @interface MailSignature : MailItem
423 @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
424 @property (copy) NSString *name; // Name of the signature
436 @interface MailMessage : MailItem
438 - (SBElementArray *) bccRecipients;
439 - (SBElementArray *) ccRecipients;
440 - (SBElementArray *) recipients;
441 - (SBElementArray *) toRecipients;
442 - (SBElementArray *) headers;
443 - (SBElementArray *) mailAttachments;
445 - (NSInteger) id; // The unique identifier of the message.
446 @property (copy, readonly) NSString *allHeaders; // All the headers of the message
447 @property MailCclr backgroundColor; // The background color of the message
448 @property (copy) MailMailbox *mailbox; // The mailbox in which this message is filed
449 @property (copy) MailText *content; // Contents of an email message
450 @property (copy, readonly) NSDate *dateReceived; // The date a message was received
451 @property (copy, readonly) NSDate *dateSent; // The date a message was sent
452 @property BOOL deletedStatus; // Indicates whether the message is deleted or not
453 @property BOOL flaggedStatus; // Indicates whether the message is flagged or not
454 @property BOOL junkMailStatus; // Indicates whether the message has been marked junk or evaluated to be junk by the junk mail filter.
455 @property BOOL readStatus; // Indicates whether the message is read or not
456 @property (copy, readonly) NSString *messageId; // The unique message ID string
457 @property (copy, readonly) NSString *source; // Raw source of the message
458 @property (copy) NSString *replyTo; // The address that replies should be sent to
459 @property NSInteger messageSize; // The size (in bytes) of a message
460 @property (copy) NSString *sender; // The sender of the message
461 @property (copy) NSString *subject; // The subject of the message
462 @property BOOL wasForwarded; // Indicates whether the message was forwarded or not
463 @property BOOL wasRedirected; // Indicates whether the message was redirected or not
464 @property BOOL wasRepliedTo; // Indicates whether the message was replied to or not
466 - (void) bounce; // Bounces a message back to the sender.
467 - (void) delete; // Delete a message.
468 - (void) duplicateTo:(MailMailbox *)to; // Copy message(s) and put the copies in the specified mailbox.
469 - (MailOutgoingMessage *) forwardOpeningWindow:(BOOL)openingWindow; // Creates a forwarded message.
470 - (void) moveTo:(MailMailbox *)to; // Move message(s) to a new mailbox.
471 - (MailOutgoingMessage *) redirectOpeningWindow:(BOOL)openingWindow; // Creates a redirected message.
472 - (MailOutgoingMessage *) replyOpeningWindow:(BOOL)openingWindow replyToAll:(BOOL)replyToAll; // Creates a reply message.
476 // 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
477 @interface MailAccount : MailItem
479 - (SBElementArray *) mailboxes;
481 @property (copy) MailSmtpServer *deliveryAccount; // The delivery account used when sending mail from this account
482 @property (copy) NSString *name; // The name of an account
483 @property (copy) NSString *password; // Password for this account. Can be set, but not read via scripting
484 @property MailExut authentication; // Preferred authentication scheme for account
485 @property (readonly) MailEtoc accountType; // The type of an account
486 @property (copy) NSArray *emailAddresses; // The list of email addresses configured for an account
487 @property (copy) NSString *fullName; // The users full name configured for an account
488 @property NSInteger emptyJunkMessagesFrequency; // Number of days before junk messages are deleted (0 = delete on quit, -1 = never delete)
489 @property NSInteger emptySentMessagesFrequency; // Number of days before archived sent messages are deleted (0 = delete on quit, -1 = never delete)
490 @property NSInteger emptyTrashFrequency; // Number of days before messages in the trash are permanently deleted (0 = delete on quit, -1 = never delete)
491 @property BOOL emptyJunkMessagesOnQuit; // Indicates whether the messages in the junk messages mailboxes will be deleted on quit
492 @property BOOL emptySentMessagesOnQuit; // Indicates whether the messages in the sent messages mailboxes will be deleted on quit
493 @property BOOL emptyTrashOnQuit; // Indicates whether the messages in deleted messages mailboxes will be permanently deleted on quit
494 @property BOOL enabled; // Indicates whether the account is enabled or not
495 @property (copy) NSString *userName; // The user name used to connect to an account
496 @property (copy, readonly) NSURL *accountDirectory; // The directory where the account stores things on disk
497 @property NSInteger port; // The port used to connect to an account
498 @property (copy) NSString *serverName; // The host name used to connect to an account
499 @property BOOL includeWhenGettingNewMail; // Indicates whether the account will be included when getting new mail
500 @property BOOL moveDeletedMessagesToTrash; // Indicates whether messages that are deleted will be moved to the trash mailbox
501 @property BOOL usesSsl; // Indicates whether SSL is enabled for this receiving account
506 // An IMAP email account
507 @interface MailImapAccount : MailAccount
509 @property BOOL compactMailboxesWhenClosing; // Indicates whether an IMAP mailbox is automatically compacted when you quit Mail or switch to another mailbox
510 @property MailE9xp messageCaching; // Message caching setting for this account
511 @property BOOL storeDraftsOnServer; // Indicates whether drafts will be stored on the IMAP server
512 @property BOOL storeJunkMailOnServer; // Indicates whether junk mail will be stored on the IMAP server
513 @property BOOL storeSentMessagesOnServer; // Indicates whether sent messages will be stored on the IMAP server
514 @property BOOL storeDeletedMessagesOnServer; // Indicates whether deleted messages will be stored on the IMAP server
519 // A .Mac email account
520 @interface MailMacAccount : MailImapAccount
525 // A POP email account
526 @interface MailPopAccount : MailAccount
528 @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)
529 @property NSInteger delayedMessageDeletionInterval; // Number of days before messages that have been downloaded will be deleted from the server (0 = delete immediately after downloading)
530 @property BOOL deleteMailOnServer; // Indicates whether POP account deletes messages on the server after downloading
531 @property BOOL deleteMessagesWhenMovedFromInbox; // Indicates whether messages will be deleted from the server when moved from your POP inbox
536 // An SMTP account (for sending email)
537 @interface MailSmtpServer : MailItem
539 @property (copy, readonly) NSString *name; // The name of an account
540 @property (copy) NSString *password; // Password for this account. Can be set, but not read via scripting
541 @property (readonly) MailEtoc accountType; // The type of an account
542 @property MailExut authentication; // Preferred authentication scheme for account
543 @property BOOL enabled; // Indicates whether the account is enabled or not
544 @property (copy) NSString *userName; // The user name used to connect to an account
545 @property NSInteger port; // The port used to connect to an account
546 @property (copy) NSString *serverName; // The host name used to connect to an account
547 @property BOOL usesSsl; // Indicates whether SSL is enabled for this receiving account
552 // A mailbox that holds messages
553 @interface MailMailbox : MailItem
555 - (SBElementArray *) mailboxes;
556 - (SBElementArray *) messages;
558 @property (copy) NSString *name; // The name of a mailbox
559 @property (readonly) NSInteger unreadCount; // The number of unread messages in the mailbox
560 @property (copy, readonly) MailAccount *account;
561 @property (copy, readonly) MailMailbox *container;
566 // Class for message rules
567 @interface MailRule : MailItem
569 - (SBElementArray *) ruleConditions;
571 @property MailCclr colorMessage; // If rule matches, apply this color
572 @property BOOL deleteMessage; // If rule matches, delete message
573 @property (copy) NSString *forwardText; // If rule matches, prepend this text to the forwarded message. Set to empty string to include no prepended text
574 @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
575 @property BOOL markFlagged; // If rule matches, mark message as flagged
576 @property BOOL markRead; // If rule matches, mark message as read
577 @property (copy) NSString *playSound; // If rule matches, play this sound (specify name of sound or path to sound)
578 @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
579 @property (copy) NSString *replyText; // If rule matches, reply to message and prepend with this text. Set to empty string to disable this action
580 @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
581 @property BOOL allConditionsMustBeMet; // Indicates whether all conditions must be met for rule to execute
582 @property (copy) MailMailbox *copyMessage; // If rule matches, copy to this mailbox
583 @property (copy) MailMailbox *moveMessage; // If rule matches, move to this mailbox
584 @property BOOL highlightTextUsingColor; // Indicates whether the color will be used to highlight the text or background of a message in the message list
585 @property BOOL enabled; // Indicates whether the rule is enabled
586 @property (copy) NSString *name; // Name of rule
587 @property BOOL shouldCopyMessage; // Indicates whether the rule has a copy action
588 @property BOOL shouldMoveMessage; // Indicates whether the rule has a transfer action
589 @property BOOL stopEvaluatingRules; // If rule matches, stop rule evaluation for this message
594 // Class for conditions that can be attached to a single rule
595 @interface MailRuleCondition : MailItem
597 @property (copy) NSString *expression; // Rule expression field
598 @property (copy) NSString *header; // Rule header key
599 @property MailEnrq qualifier; // Rule qualifier
600 @property MailErut ruleType; // Rule type
605 // An email recipient
606 @interface MailRecipient : MailItem
608 @property (copy) NSString *address; // The recipients email address
609 @property (copy) NSString *name; // The name used for display
614 // An email recipient in the Bcc: field
615 @interface MailBccRecipient : MailRecipient
620 // An email recipient in the Cc: field
621 @interface MailCcRecipient : MailRecipient
626 // An email recipient in the To: field
627 @interface MailToRecipient : MailRecipient
632 // A mailbox that contains other mailboxes.
633 @interface MailContainer : MailMailbox
638 // A header value for a message. E.g. To, Subject, From.
639 @interface MailHeader : MailItem
641 @property (copy) NSString *content; // Contents of the header
642 @property (copy) NSString *name; // Name of the header value
647 // A file attached to a received message.
648 @interface MailMailAttachment : MailItem
650 @property (copy, readonly) NSString *name; // Name of the attachment
651 @property (copy, readonly) NSString *MIMEType; // MIME type of the attachment E.g. text/plain.
652 @property (readonly) NSInteger fileSize; // Approximate size in bytes.
653 @property (readonly) BOOL downloaded; // Indicates whether the attachment has been downloaded.
654 - (NSString *) id; // The unique identifier of the attachment.