|
|
NSMailDelivery |
| Inherits from: | |
| Declared In: |
class to enable delivery of an email message using Mail.
The NSMailDelivery class enables applications to send
email messages using Mail. It includes the ability to send both
plain text and MIME-encapsulated email messages through
deliverMessage:headers:format:protocol:,
and also provides a simplified interface,
deliverMessage:subject:to:,
for delivering basic messages easily.
Deliver a message.
Deliver a message (basic)
Have delivery accounts have been configured?
deliverMessage:headers:format:protocol: |
Deliver a message.
+ (BOOL)deliverMessage: (NSAttributedString *)messageBody headers: (NSDictionary *)messageHeaders format: (NSString *)messageFormat protocol: (NSString *)deliveryProtocol;
messageBodythe actual contents of the message. If messageFormat
is NSASCIIMailFormat, any rich text or attachments
in messageBody will be lost.
messageHeaderscontains all of the values that will appear in the message header, for example, "To", "From", "Subject", etc. If the value is an array, the elements in the array will converted to a comma seperated list of values in the message header
messageFormatcan be either NSASCIIMailFormat or NSMIMEMailFormat
deliveryProtocolcan be NSSMTPDeliveryProtocol or nil to use the platform's default deliveryProtocol (this is the preferred choice).
deliverMessage:headers:format:protocol: is used to deliver
a message vie email. It may be MIME-encoded or plain text, but requires
all header fields to be specified.
For a simpler (but less flexible) interface, see
deliverMessage:subject:to:.
deliverMessage:subject:to: |
Deliver a message (basic)
+ (BOOL)deliverMessage:(NSString *)messageBody subject:(NSString *)messageSubject to:(NSString *)destinationAddress;
messageBodyis the plain text contents of the message
messageSubjectis the subject of the message
destinationAddressis the recipient's email address, e.g. johndoe@apple.com
deliverMessage:subject:to: is a method for delivering basic
messages via email. For more complex requirements (such as MIME), see
deliverMessage:headers:format:protocol:.
hasDeliveryClassBeenConfigured |
Have delivery accounts have been configured?
+ (BOOL)hasDeliveryClassBeenConfigured;
hasDeliveryClassBeenConfigured returns YES/NO according
to whether delivery accounts have been configured.
Last Updated: 2009-04-17