CTCoreMessage Class Reference

List of all members.


Properties

id init
id initWithMessageStruct:(struct mailmessage *)message
id initWithFileAtPath:(NSString *)path
id initWithString:(NSString *)msgData
void fetchBody
NSString * body
void setBody:(NSString *)body
NSString * subject
void setSubject:(NSString *)subject
NSCalendarDate * sentDate
BOOL isNew
NSString * messageId
NSString * uid
NSUInteger sequenceNumber
void setSequenceNumber:(NSUInteger)sequenceNumber
NSSet * from
void setFrom:(NSSet *)addresses
CTCoreAddresssender
NSSet * to
void setTo:(NSSet *)addresses
NSSet * cc
void setCc:(NSSet *)addresses
NSSet * bcc
void setBcc:(NSSet *)addresses
NSSet * replyTo
void setReplyTo:(NSSet *)addresses
NSString * render

Detailed Description

CTCoreMessage is how you work with messages. The easiest way to instantiate a CTCoreMessage is to first setup a CTCoreAccount object and then get a CTCoreFolder object and then use it's convience method messageWithUID: to get a message object you can work with.

Anything that begins with "fetch", requires that an active network connection is present.

Property Documentation

- (NSSet*) bcc [protected]

Returns the list of people the message was bcced to, returns an NSSet containing CTAddress's.

- (NSString*) body [protected]

This method returns the parsed message body as an NSString.

- (NSSet*) cc [protected]

Returns the list of people the message was cced to, returns an NSSet containing CTAddress's.

- (void) fetchBody [protected]

This method fetches the message body off of the server, and places it in a local data structure which can later be returned by the method body. This method require that an active MailCore network connection is present.

- (NSSet*) from [protected]

Parses the from list, the result is an NSSet containing CTCoreAddress's

- (id) init [protected]

Used to instantiate an empty message object.

- (id) initWithFileAtPath [protected]

Used to instantiate a message object based off the contents of a file on disk. The file on disk must be a valid MIME message.

- (id) initWithMessageStruct [protected]

Used to instantiate a message object with the contents of a mailmessage struct (a LibEtPan type). The mailmessage struct does not include any body information, so after calling this method the message will have a body which is NULL.

- (id) initWithString [protected]

Used to instantiate a message object based off a string that contains a valid MIME message

- (BOOL) isNew [protected]

Returns YES if the method is unread.

- (NSString*) messageId [protected]

A machine readable ID that is guaranteed unique by the host that generated the messaeg

- (NSString*) render [protected]

Returns the message rendered as the appropriate MIME and IMF content. Use this only if you want the raw encoding of the message.

- (NSSet*) replyTo [protected]

Returns the list of people the message was in reply-to, returns an NSSet containing CTAddress's.

- (CTCoreAddress*) sender [protected]

Returns the sender, which isn't always the actual person who sent the message, it's usually the address of the machine that sent the message. In reality, this method isn't very useful, use from: instead.

- (NSCalendarDate*) sentDate [protected]

Return the date the message was sent. If a date wasn't included then a date from the distant past is used instead.

- (NSUInteger) sequenceNumber [protected]

Returns the message sequence number, this number cannot be used across sessions

- (void) setBcc [protected]

Sets the message's bcc addresses

Parameters:
addresses A NSSet containing CTCoreAddress's

- (void) setBody [protected]

This method sets the message body. Plaintext only please!

- (void) setCc [protected]

Sets the message's cc addresses

Parameters:
addresses A NSSet containing CTCoreAddress's

- (void) setFrom [protected]

Sets the message's from addresses

Parameters:
addresses A NSSet containing CTCoreAddress's

- (void) setReplyTo [protected]

Sets the message's reply to addresses

Parameters:
addresses A NSSet containing CTCoreAddress's

- (void) setSequenceNumber [protected]

Set the message sequence number, this will NOT set any thing on the server. This is used to assign sequence numbers after retrieving the message list.

- (void) setSubject [protected]

Will set the subject of the message, use this when composing e-mail.

- (void) setTo [protected]

Sets the message's to addresses

Parameters:
addresses A NSSet containing CTCoreAddress's

- (NSString*) subject [protected]

Returns the subject of the message.

- (NSSet*) to [protected]

Returns the list of people the message was sent to, returns an NSSet containing CTAddress's.

- (NSString*) uid [protected]

Returns an NSString containing the messages UID.