CWTransport


Discussion

This protocol defines a generic interface for sending messages. The CWSMTP and CWSendmail classes fully implement this protocol.

Declared In

CWTransport.h



Methods

-message
-messageData
-recipients
-sendMessage
-setMessage:
-setMessageData:
-setRecipients:

message


- (CWMessage *) message; 
Return Value

The CWMessage instance.

Discussion

This method is used to obtain the Message instance previously set by calling -setMessage:


messageData


- (NSData *) messageData; 
Return Value

The message's raw representation.

Discussion

This method is used to obtain the message (its raw representation) previously set by calling -setMessageData:


recipients


- (NSArray *) recipients; 
Return Value

The array of recipients.

Discussion

This method is used to obtain the recipients set when calling -setRecipients:.


sendMessage


- (void) sendMessage; 
Discussion

This method sends the message previously set with -setMessage: or -setMessageData:. It posts a PantomimeTransportMessageNotSent notification (and calls -messageNotSent: on the delegate, if any) if the message could not be sent. It ports a PantomimeTransportMessageSent notification (and calls -messageSent: on the delegate, if any) if the message has been successfully sent. This method is fully asynchronous.


setMessage:


- (void) setMessage: (CWMessage *) theMessage; 
Parameters
theMessage

The message to send.

Discussion

This method is used to set the message (instance of the CWMessage class) that the transport class will eventually send (by calling -sendMessage).


setMessageData:


- (void) setMessageData: (NSData *) theData; 
Parameters
theMessage

The message to send.

Discussion

This method is used to set the message (as raw source) that the transport class will eventually send (by calling -sendMessage).


setRecipients:


- (void) setRecipients: (NSArray *) theRecipients; 
Parameters
theRecipients

An NSArray instance which contains CWInternetAddress instances for all recipients.

Discussion

This method is used to specify the recipients of the message.