MailDelivery is a framework, originally created for one of my applications Massive Mail. It was designed using the MailDelivery class (part of the Message framework) as model and to cover the following needs.
- I want to import accounts from Mail.app (if I need to create a "Accounts Preference Pane" most of the job is already done).
- I want to send messages from different places of my application, so, I want to send messages without having to write dozens or hundreds of lines of extra code.
- I don't want to deal with Keychain to send emails, but I want Keychain support to store my passwords (including MobileMe accounts).
- If a message could not be sent, I want to know the reason.
- I want to include custom message headers.
- I want SSL and TLS support.
- I want to be able to send multipart, HMTL and plain text messages, but I do not want to read dozens of RFC's in order to do that.
- Sometimes I want to provide my own source
- If something went wrong, I want my application be able to send emails through Mail.
What is new in this release:
- MailDelivery now uses the primary mailbox account instead of the first SMTP server it can find.
- Mail accounts will no longer be saved to the application's preferences. This fixes a problem where, if the user added a new mail account or SMTP server in Mail, then MailDelivery would continue to use the old accounts and the user would never know. Now +deliveryAccounts will load in persistent accounts (in case the user doesn't use Mail at all and developers want to add their own accounts) and attach Apple Mail accounts to the end.
- Was added a -finalize method to TCPConnection.
- (Message) The method -source has been fragmented, now gets its value from two new methods, -header and -body (private for now).
- (NSAttributedStringAdditions) Was added a -parts method, so instances of NSAttributedString can provide their own parts directly.
- (Part) The method -relatedBoundary is now public.
- (Part) Was added -description method so each part can provide its value directly.