199 Commits

Author SHA1 Message Date
Matt Ronge 2ac9928971 Added TLS support for SMTP 2012-11-20 13:41:39 -06:00
Matt Ronge 1766cf21d2 Merged 2012-11-19 10:29:40 -06:00
Kris Wong bb29c7911f Additional cleanups for memory handling. 2012-11-16 17:37:26 -06:00
Kris Wong 899bf653ce Addressed review comments by mronge. 2012-11-16 17:06:45 -06:00
Kris Wong e44d7169a6 Fix for attachment content type handling on iOS. 2012-11-16 14:24:28 -06:00
Kris Wong 053ab837fb Update the iOS target to include new source file. 2012-11-15 16:01:30 -06:00
Kris Wong 5d97ad5220 Cleanup memory leak. 2012-11-15 15:57:31 -06:00
Matt Ronge 8a89fd2fc8 SMTP memory leak fixes 2012-11-09 16:03:45 -06:00
Matt Ronge a857dd00af Fixes bug #36 where a double free as occuring 2012-11-09 15:25:46 -06:00
Matt Ronge 1ce5f390c7 When doing SMTP auth if PLAIN is not available, fallback to LOGIN. Also some TLS fixes for older servers 2012-11-09 12:03:05 -06:00
Matt Ronge 9aec18fe31 Misc fixes 2012-11-06 14:35:34 -06:00
Matt Ronge e0396cbf50 Reworked IDLE implementation and moved it to CTCoreFolder 2012-11-02 14:05:53 -05:00
Matt Ronge e67020cc10 Added way to git a list of the capabilities from the server 2012-10-31 18:26:59 -05:00
Matt Ronge 4dd4759fb5 Reworking the IDLE implementation 2012-10-31 17:45:14 -05:00
Kris Wong b3a1e0689f Added rfc822Header method to CTCoreMessage for fetching the full message headers. 2012-10-26 19:22:49 -05:00
Kris Wong 81e574398c Added support for the XLIST command. Fixed mailbox names to be converted to/from UTF-7. 2012-10-16 15:08:40 -05:00
Matt Ronge 483a932dd5 Remove the disconnect in the example that was causing crashes 2012-10-15 19:04:37 -05:00
Matt Ronge 784d4e4bae Fix a nasty memory leak 2012-10-10 16:46:56 -05:00
Matt Ronge 3dfe73d8df Update README.md 2012-10-08 22:20:36 -05:00
Matt Ronge 016aca79d9 Added disposition type inline to html parts 2012-10-08 20:21:32 -05:00
Matt Ronge d2fd023d68 Switched to using quoted printable for text and html parts. (Thanks for the patch Michael Koziarski) 2012-10-08 20:15:18 -05:00
Matt Ronge 5a033e98ec Merge pull request #50 from NZKoz/flag_setting_error
Ensure flag changes are persisted to imap after setFlags:forMesssage: is called
2012-10-08 15:02:51 -07:00
Michael Koziarski 175b398c5c Do a folder check to ensure flags get stored immediately
Prevents loss of flags if the app terminates or otherwise doesn't call logout or expunge.
2012-10-05 09:35:03 +13:00
Matt Ronge 48e04c6471 Merge pull request #46 from mkdynamic/patch-1
Consistent submodule initialization with libmailcore.com
2012-09-26 16:51:50 -07:00
Mark Dodwell b0180fbfcd Consistent submodule initialization with libmailcore.com 2012-09-25 00:16:59 -07:00
Matt Ronge c6eab3fff5 Merge pull request #45 from yonder-innovation/master
Fix for double release issue
2012-09-21 08:37:19 -07:00
Ovidiu Sabou 829a820342 Merge https://github.com/yonder-innovation/MailCore into HEAD 2012-09-21 14:33:04 +03:00
Ovidiu Sabou 92cc79a5c6 Fixed a double release issue 2012-09-21 14:31:58 +03:00
Matt Ronge a182d018ae Project fixes for Xcode 4.5 and armv7s 2012-09-20 14:46:27 -05:00
Matt Ronge 182298db69 Deployment targets are now set to default 2012-09-20 10:35:24 -05:00
Matt Ronge d05b8bbeb3 Check connect error condition in uidValidity and uidNext, should help avoid crashes (i hope) 2012-09-19 12:40:06 -05:00
Matt Ronge 4012917c5c Merge pull request #43 from Electriclabs/Fixup
Fix for crash when data is nil
2012-09-19 08:01:02 -07:00
Christopher Lyon Anderson d8034d4c83 Fix for crash when data is nil 2012-09-19 09:13:04 +01:00
Matt Ronge 859c5b794f Fixes a crasher that could occur when tearing down the CTMIME_SinglePart in an error condition. (Thanks Daishi) 2012-09-17 19:40:15 -05:00
Matt Ronge 406bd77197 Submodules now support armv7s 2012-09-17 18:42:34 -05:00
Matt Ronge c4098c1f06 Fixed an Xcode 4.5 compile issue 2012-09-12 15:45:53 -05:00
Matt Ronge 7daedee7aa MIME headers are imported by MailCore.h for use by clients of the library 2012-09-12 15:45:43 -05:00
Matt Ronge abb0520f0b Removed the name method from CTCoreFolder.
At this point we don't know what the proper path delimiter is. The only way to get the delimiter is to make a IMAP call to the server to get a list of mailboxes. So instead this should be doing by the user of the framework
2012-09-10 18:43:03 -05:00
Matt Ronge fef9c331f3 Fixed an SMTP bug where an error wasn't returned when the username/login was wrong. Also added a nicer error message for when this happens 2012-09-10 16:46:28 -05:00
Matt Ronge f9581ee615 Had to change the reference and inReplyTo to use arrays 2012-09-10 11:30:01 -05:00
Matt Ronge 44d69c9b03 It is now possible to set a specific multipart type 2012-09-10 11:24:00 -05:00
Matt Ronge 9037bf3350 Had a duplicate init definition in the header 2012-09-10 11:19:23 -05:00
Matt Ronge 6e5e72d502 Had an extra IMAP check being sent to the server when setting the flags 2012-09-10 11:18:57 -05:00
Matt Ronge d39296426a Merge pull request #37 from jdg/master
Add setInReplyTo, references and setReferences functionality to CTCoreMessage
2012-09-08 08:37:12 -07:00
Jonathan George 163cb86770 Add references, setReferences and setInReplyTo functionality for CTCoreMessage. 2012-09-07 16:58:39 -05:00
Matt Ronge fbd1774f0c Changed how path delimiters are handles 2012-09-07 13:41:08 -05:00
Matt Ronge 4a7a6f817c Fixed a memory leak that popped up when sending messages. 2012-09-02 20:35:07 -05:00
Matt Ronge 1840b6ee95 Merge pull request #34 from rgigger/master
added an inReplyTo method to CTCoreMessage
2012-09-02 16:51:05 -07:00
Rick Gigger bd9e3296d7 added inReplyTo method to CTCoreMessage 2012-09-01 01:25:36 -06:00
Matt Ronge 358e58e029 Merge pull request #33 from ghdk/master
IMAP APPEND
2012-08-31 06:59:48 -07:00
Dionysios Kalofonos 1f64ed5b56 Exposes the IMAP APPEND command, see the IMAP RFC 4549. 2012-08-31 09:39:27 +03:00
Matt Ronge e10dc48ea1 New version of iOS ports 2012-08-06 15:10:17 -05:00
Matt Ronge ba2b0ea12a Merge branch 'master' of github.com:mronge/MailCore 2012-08-03 15:16:57 -05:00
Matt Ronge 28594aff21 Somehow CTCoreAttachment wasn't being included 2012-08-03 14:54:00 -05:00
Matt Ronge 4511d3b133 Merge pull request #26 from HenningJ/issue23
Added instance variable for property parentFolder. Fixes #23.
2012-08-03 11:11:54 -07:00
Henning Jungkurth 538f405a1b Added instance variable for property parentFolder. Fixes #23. 2012-08-03 19:21:55 +02:00
Matt Ronge 5537a637a1 Merge branch 'master' of github.com:mronge/MailCore 2012-07-27 15:24:46 -05:00
Matt Ronge 8230b1e8e4 Updated to build with Xcode 4.5 2012-07-26 21:05:10 -05:00
Matt Ronge a89ce29177 Changed copy and move methods to only take the UID, this is much more efficient than having to construct an entire CTCoreMessage 2012-07-25 22:58:03 -05:00
Matt Ronge 99a87a418f Fixed a bug where the message could end up without its parent folder, which causes a crash 2012-07-25 10:59:37 -05:00
Matt Ronge 25c22d15f4 Merge branch 'master' of github.com:mronge/MailCore 2012-07-23 14:36:00 -05:00
Matt Ronge 057a96d531 Folders that can't be selected won't be returned in the folder list. Also all folder path delimiters are converted to / 2012-07-23 14:35:50 -05:00
Matt Ronge 69e90c1bda Merge branch 'master' of github.com:mronge/MailCore 2012-07-21 16:05:10 -05:00
Matt Ronge 8419f444e9 Updated contributor list 2012-07-16 21:32:07 -05:00
Matt Ronge 2bfd413f8a Merge pull request #18 from holtwick/master
Example improvement
2012-07-16 19:28:19 -07:00
Dirk Holtwick d76fd2946a Added connection error alert
Signed-off-by: Dirk Holtwick <dirk.holtwick@gmail.com>
2012-07-14 11:29:34 +02:00
Dirk Holtwick b350ef36d3 Improved Inbox Fetcher Example
- Remeber field values
- Make SSL default
- Add an error output to log if not connected

Modified using Xcode 4 therfore may introduce incompatibilities with older Xcodes

Signed-off-by: Dirk Holtwick <dirk.holtwick@gmail.com>
2012-07-14 11:25:52 +02:00
Matt Ronge 704741e85b IMPORTANT: Changed how importing mailcore headers works so it behaves when archiving your app for distribution. Please see the docs for more info 2012-07-12 14:55:50 -05:00
Matt Ronge 99a3147be4 Minor doc update 2012-07-11 16:40:08 -05:00
Matt Ronge c570d2d85b Added a method for testing SMTP credentials and in the process fixed up some of the error messages 2012-07-11 16:36:24 -05:00
Matt Ronge ad39f14b2d OpenSSL is now configured to be thread safe 2012-07-11 11:08:27 -05:00
Matt Ronge a656b30632 Updated submodule refs 2012-07-09 13:20:11 -05:00
Matt Ronge 7e08f69d88 Added a way to tell if a message body is HTML or not when fetching 2012-07-07 15:13:40 -05:00
Matt Ronge b4ba0f6ab3 Fixed a bug where messageWithUid wasn't working 2012-07-07 15:13:21 -05:00
Matt Ronge 7a496655f2 Found a really nasty memory leak that occurred when fetching messages 2012-07-06 10:57:27 -05:00
Matt Ronge 6f823c7804 Switched to using my own fork of iOSPorts 2012-07-05 19:34:59 -05:00
Matt Ronge 33070d46a8 Merge pull request #17 from jwilling/master
fix small mistake and silence an error
2012-07-05 15:43:03 -07:00
Jonathan Willing fe1049ec3b fix small mistake, silence error 2012-07-05 17:13:18 -05:00
Matt Ronge 1d833fb599 Fixed a bug where messages with multi-byte characters would be truncated, thanks to Denis Kutlubaev and Dinh Viet Hoa for their help 2012-07-03 21:56:14 -05:00
Matt Ronge c95e8fc483 Updated the inline API docs 2012-07-03 15:41:43 -05:00
Matt Ronge a19d761806 Cleaned up the messagesender example for OS X and made a few OS X related fixes to MailCore in the process 2012-07-03 11:44:12 -05:00
Matt Ronge ee03eb476b More minor readme changes 2012-07-03 00:52:37 -05:00
Matt Ronge 7cfa165d1c Updated README 2012-07-03 00:51:23 -05:00
Matt Ronge eeeeaad741 CTCoreMessage now has flag attribute 2012-07-02 16:53:02 -05:00
Matt Ronge f082b9252f Fixed a up a few problems the static analyzer 2012-07-02 12:35:48 -05:00
Matt Ronge 88755514ba Fixed a bug where the uid validity was returned instead of UID 2012-07-02 12:11:27 -05:00
Matt Ronge fa1445389c Updated some documentation 2012-06-25 15:56:26 -05:00
Matt Ronge 7db87173dc - UIDs are now stored as integers
- Removed isUIDValid
- Added uidNext to CTCoreFolder
- Added a way to fetch messages by UID range
2012-06-25 15:50:17 -05:00
Matt Ronge 42c158ccb5 Added error for when the username/pass is wrong 2012-06-22 11:23:59 -05:00
Matt Ronge e5ef43acd1 Removed exception strings that aren't used anymore 2012-06-18 16:48:29 -05:00
Matt Ronge 854827d81f Removed use of exceptions completely from MailCore 2012-06-18 16:47:26 -05:00
Matt Ronge f7f9d945ba - Removed some old ways of requesting message lists and CTBareMessage
- In the process found a memory	      error in CTCoreMessage,	found and fixed
- Fixed	 a few broken tests
2012-06-08 14:55:27 -05:00
Matt Ronge a754f12ad4 More cleanup on message list fetching, also wrote some tests and documentation 2012-06-08 13:21:31 -05:00
Matt Ronge 40f92a2c4e Tests pass again 2012-06-07 12:03:10 -05:00
Matt Ronge 813b6aac2f Oops, forgot to commit the license file 2012-06-07 11:38:42 -05:00
Matt Ronge 238ae7c870 Added a license file, cleaned up one copyright notice 2012-06-07 11:38:26 -05:00
Matt Ronge 2cf22b7f10 Got tests running again 2012-06-07 11:02:13 -05:00
Matt Ronge 449eefb13b Started implementing a new way to fetch message lists 2012-06-07 11:02:01 -05:00
Matt Ronge 7c13b7b951 Converted sample projects to latest Xcode project format and converted files from tabs to spaces 2012-05-30 17:49:23 -05:00
Matt Ronge d6f68a684b Updated projects to fix build errors 2012-05-24 18:35:48 -05:00
Matt Ronge c7e8e069b6 Cleaned up errors and turned on warnings as errors 2012-05-24 16:20:54 -05:00
Matt Ronge 4cafeae3a2 Added fix for handling of attachments with incompatiable mime header 2012-05-24 16:13:22 -05:00
Matt Ronge 6b9b952da1 Turned the fetchBody method into fetchBodyStructure 2012-05-24 14:32:26 -05:00
Matt Ronge acdc204854 Forget to clear out the progress handler after finishing a fetch 2012-05-24 14:28:55 -05:00
Matt Ronge f9749c4362 Added a method to CTBareAttachment that allows you to get progress on the download, also added a method on CTMIME_SinglePart to get the downloaded size 2012-05-24 14:28:28 -05:00
Waseem Sadiq 4b86e865d8 Added IDLE 2012-05-24 14:20:17 -05:00
Waseem Sadiq 26793e2976 Added additional checks for html body types 2012-05-24 14:19:17 -05:00
Waseem Sadiq 4823189dc9 Fixed text/html detection 2012-05-24 14:15:19 -05:00
Waseem Sadiq f9bdaf35d4 Improved attachment handling (thanks to waseems) 2012-05-24 14:13:25 -05:00
Matt Ronge 29c3274bb8 Added isStarred (thanks Waseem) 2012-05-24 14:10:46 -05:00
Matt Ronge c812c21f9b Added .idea (AppCode) to .gitignore 2012-05-24 13:56:21 -05:00
Matt Ronge e510829760 Upgraded MailCore project and updated version of libetpan in use 2012-05-24 12:59:05 -05:00
Matt Ronge 4ab690dbdd Merge branch 'master' of github.com:mronge/MailCore 2012-05-23 14:36:33 -05:00
Matt Ronge d04c7c33aa Added TODO where code in CTCoreAttachment.m needs to be updated for iOS 2012-05-23 14:36:05 -05:00
Matt Ronge 068bff894b Merge pull request #9 from jils/master
Fix for crash in async SMTP connection cleanup
2012-03-14 09:31:23 -07:00
jils 1759893361 Detabbed recent changes. 2012-03-13 22:24:54 -07:00
jils a1811baa6b Fixed crash when cleaning up after a failed SMTP connection e.g. blocked smtp port 2012-03-13 22:19:34 -07:00
Matt Ronge a76486de0d Removed unnecessary step from readme 2012-02-21 19:09:48 -06:00
Matt Ronge 6930e8dff5 The copy headers step was missing from the iOS target 2012-02-21 19:07:33 -06:00
Matt Ronge 18a666603b Made some changes to the last merge request 2012-01-15 16:22:59 -06:00
Matt Ronge 345204f992 Merge pull request #7 from kaustubh-kabra/master
Added functionality for forwarding and replying a mail containing HTML content. Also, HTML content was made to be in editable format for implementing this functionality.
2012-01-15 13:36:20 -08:00
Kaustubh Kabra 076a43640b Ready for merge to enable editable HTML body for reply/forward and also,for sending the edited HTML 2012-01-09 11:29:40 +05:30
Kaustubh Kabra 89e09bcdab Changes to CTCoreMessage for handling html content -> To get editeble HTML and to set edited HTML as body 2012-01-09 11:16:28 +05:30
Kaustubh Kabra a6dd15fce9 Added CTMIME_HtmlPart for replying/ forwarding mail with HTML part content. 2012-01-09 11:09:52 +05:30
Matt Ronge 0099b84cb2 Modified how the example projects link against mailcore 2011-10-19 20:48:47 -05:00
Matt Ronge 08a6704b23 Forget to add libssl to example project 2011-10-19 19:37:39 -05:00
Matt Ronge 0eea0ccdd4 Merge branch 'master' of github.com:mronge/MailCore 2011-10-17 20:58:37 -05:00
Matt Ronge 959583fc71 Updated projects and added an iOS example project. very much still a work in progress 2011-10-17 20:58:23 -05:00
Matt Ronge d4a3ecb7a8 Update README.md 2011-10-16 22:06:46 -05:00
Matt Ronge 48620d0049 Added the wrong URL for the libetpan submodule 2011-10-16 21:38:29 -05:00
Matt Ronge fe7bf272b4 Change README file ext 2011-10-16 20:15:22 -05:00
Matt Ronge f7f69c9b9a Change the mailcore ASCII text to be a code block in markdown 2011-10-16 20:13:50 -05:00
Matt Ronge fbdd8a99b4 Edits to the readme file 2011-10-16 20:12:39 -05:00
Matt Ronge 3f8f4d8859 Added a really basic readme file 2011-10-16 20:10:07 -05:00
Matt Ronge 1071707943 Updated project so that it builds for iOS 2011-10-16 19:54:48 -05:00
Matt Ronge aad7cd55d3 Removing old libetpan 2011-10-16 16:12:32 -05:00
Matt Ronge c6e6b6ec57 Removing .hgignore replacing it with .gitignore 2011-10-16 15:50:57 -05:00
Matt Ronge 794eb61b01 Made some tweaks to libetpan where closing brace for an extern C was missing, will remove once Hoa commits to libetpan 2011-05-18 21:38:49 -05:00
Matt Ronge 529dad0e3b Updated MessageSender example project 2011-05-10 22:24:15 -05:00
Matt Ronge 7b38a2bd06 Added comments to two new methods in CTCoreMessage: rfc822 and messageAsEmlx 2011-05-10 21:56:53 -05:00
Matt Ronge a1bf39710a Added the date to the emlx data 2011-05-10 20:19:40 -05:00
Matt Ronge 16ca0c31bd Reformated the comments for the new date methods 2011-05-10 20:19:28 -05:00
Matt Ronge 89e8372e3b Fixing merge I messed up earlier 2011-05-10 19:59:22 -05:00
Matt Ronge a59a8c7c40 Flags are now written out properly in Emlx 2011-05-10 19:33:09 -05:00
Matt Ronge 81df54929d Flags are written out with emlx data 2011-05-09 20:24:07 -05:00
Matt Ronge 90f2639bc7 Fixed memory leak with downloading the rfc822 content of a message 2011-05-09 19:35:05 -05:00
Matt Ronge e2a4fe8313 Updated libetpan 2011-05-09 17:41:38 -05:00
Matt Ronge e3dbca8a91 Added some code to CTCoreMessage to return the message as an emlx file 2011-05-09 16:34:02 -05:00
Matt Ronge e4a4a6ed02 Some project tweaks, all examples are building again 2011-05-08 22:52:12 -05:00
Matt Ronge 922da5a671 Added Matt R Miller to contributors 2011-05-08 13:59:15 -05:00
Matt Ronge 8512e3f32b Merged 2011-05-08 13:57:56 -05:00
Matt Ronge ae4d764843 Merged 2011-05-08 13:54:34 -05:00
Matt Ronge ccaba6cabb Merged 2011-05-08 13:31:22 -05:00
jils 1781a1bb25 ignore personal Xcode files as well as svn stff
--HG--
branch : KJ-1.0
2010-08-12 19:28:44 -07:00
jils f4728b6d36 If filename is available set proper content-disposition attributes.
--HG--
branch : KJ-1.0
2010-08-12 19:28:06 -07:00
jils 2f7f6acf61 Minor cleanup
--HG--
branch : KJ-1.0
2010-05-26 02:16:04 -07:00
jils 35b9c2216c Correctly cancelling smtp thread (thanks to Hoa). Sending status along to delegate.
--HG--
branch : KJ-1.0
2010-05-26 02:10:35 -07:00
jils 86650ae1e8 Minor cleanup for async smtp connection. Still killing NSThread because libetpan's network timeout holds us up too long.
--HG--
branch : KJ-1.0
2010-05-19 00:31:49 -07:00
jils 3699061586 First cut at adding async smtp message sending
--HG--
branch : KJ-1.0
2010-05-10 02:10:00 -07:00
Matt Ronge 29aa63d5d9 Add support for sending attachments (thanks to Jaremy Creechley)
--HG--
branch : KJ-1.0
2010-05-03 21:36:29 -05:00
Matt Ronge fed513ff6d Removed my personal project files
--HG--
branch : KJ-1.0
2010-05-03 20:40:28 -05:00
Matt Ronge d4165e4edc Changed debug mode to only build active archs
--HG--
branch : KJ-1.0
2010-05-03 20:39:57 -05:00
Matt Ronge fa9234d25c Added new method bodyPreferringPlainText
--HG--
branch : KJ-1.0
2010-04-25 20:39:33 -05:00
mattrmiller 6d31e7dff3 * Changed copy message to use mesage reference instead of UID
* Implemented move message
* Fixed send date
2010-03-29 17:33:01 -04:00
Matt Ronge d7d0a27562 Debug now builds again 2010-03-10 15:18:03 -06:00
Matt Ronge 06f1d0c801 Added Gabor Cselle to list of contributors 2010-03-10 14:53:25 -06:00
Matt Ronge 74e085f43b Editing .hgignore file to ignore reMail (http://code.google.com/p/remail-iphone/) build script products 2010-03-08 20:37:59 -06:00
Matt Ronge 76a92b73ff Updated getting started to include new link to remail open source 2010-03-08 20:04:52 -06:00
Matt Ronge ac1698e3f6 Patch from Gabor Cselle, adds isUnread and changes isNew 2010-02-04 19:52:27 -06:00
Matt Ronge 7950379ab2 Fix from Gabor for isNew, had bad logic 2010-02-01 15:33:03 -06:00
Matt Ronge cadff79c96 Added in sentDate for KJ
--HG--
branch : KJ-1.0
2010-01-24 12:18:19 -06:00
Matt Ronge 89ea6081dd Added MailCoreDisableLogging to header 2010-01-19 11:50:27 -06:00
Matt Ronge 43a700159a Added iphone info to getting started 2010-01-07 11:19:42 -06:00
Matt Ronge f8d1d4aa6f Updated inline comments for totalMessageCount and unreadMessageCount 2010-01-04 20:52:52 -06:00
Matt Ronge 64abb83877 Changed how totalMessageCount works so a round trip is avoided, should be much faster 2010-01-04 20:45:07 -06:00
Matt Ronge 595ad0e721 More updates for libetpan 2010-01-04 20:44:40 -06:00
Matt Ronge 00db256f68 Forgot to include some new libetpan files 2010-01-04 20:09:25 -06:00
Matt Ronge e5af6dbac4 Updated to libetpan tip 2010-01-04 20:09:08 -06:00
Matt Ronge 188545b672 Updated libetpan 2009-12-18 17:49:56 -08:00
Matt Ronge dbe9e6aa99 No longer tries to build against expat 2009-12-18 12:53:50 -08:00
Matt Ronge 07091cd01f Included iphone target in mailcore 2009-12-18 11:49:43 -08:00
Matt Ronge b9e4aef7be Added Gabor's additions to mailimap.c for returning login errors 2009-12-18 11:49:12 -08:00
Matt Ronge 54e6b3b39d Changed imports 2009-12-18 11:35:39 -08:00
Matt Ronge 439cd441c8 Added Gabor's disable logging code 2009-12-18 11:35:28 -08:00
Matt Ronge abfea39e23 Integrated Gabor Cselle's MailCore changes 2009-12-16 13:37:21 -08:00
Matt Ronge b793f00e13 Added an authors file 2009-12-09 16:38:39 -06:00
Matt Ronge 222f8c8643 Fixes memory leak when fetching flags, thanks to Kyle Van Essen for the fix 2009-12-09 16:17:27 -06:00
Matt Ronge 81a16dd4dd Build scripts are no longer needed 2009-12-08 14:38:29 -06:00
Matt Ronge 2ee48a0c68 MailCore now links statically against libetpan 2009-12-08 14:29:03 -06:00
Matt Ronge 74d28582ec Added generated libetpan header files to repo for convenience 2009-12-08 14:19:59 -06:00
Matt Ronge 376420296d Added raw check of libetpan to repo 2009-12-08 14:05:37 -06:00
Matt Ronge fddb0de931 Fixed project so it builds for all archs and 64/32bit 2009-11-07 14:51:31 -06:00
Matt Ronge 3aa967a63a Fixed a major memory leak in CTCoreMessage, happened when init-ing from string 2009-11-01 11:44:10 -06:00
Matt Ronge d799f75a87 Switched to using libetpan as a companion framework 2009-11-01 11:39:05 -06:00
Matt Ronge 41eb5dee73 Fixed MailCore so that it uses unicode and properly converts incoming
messages from their charsets to UTF-8
2009-09-04 21:22:05 -05:00
Matt Ronge a8a489a7c4 Disabled Xcode unit tests GUI because it freezed in 10.6, temporary workaround with custom executable. Also turned off account unit tests that doesn't work 2009-09-03 18:00:40 -05:00
Matt Ronge 4bfc59f5e7 Reverse of my decision, decided to include source 2009-08-10 19:45:00 -05:00
Matt Ronge 431460caba Decided to not include the source with the build, since the source is easily fetchable on bitbucket 2009-08-10 19:42:27 -05:00
Matt Ronge 834a9d59e6 Added tag 0.2.7 for changeset c61c66cb67e8 2009-08-10 19:40:45 -05:00
125 changed files with 15436 additions and 7187 deletions
+6
View File
@@ -0,0 +1,6 @@
build
*~
xcuserdata
.DS_Store
include/
.idea
+6
View File
@@ -0,0 +1,6 @@
[submodule "libetpan"]
path = libetpan
url = https://github.com/mronge/libetpan.git
[submodule "iOSPorts"]
path = iOSPorts
url = https://github.com/mronge/iOSPorts.git
-9
View File
@@ -1,9 +0,0 @@
syntax: glob
TAGS
build
OpenSourceProjects/libetpan-*
OpenSourceProjects/include
Documentation
.DS_Store
*~
*.pyc
-3
View File
@@ -1,3 +0,0 @@
a17a1e69ca0519c1bb5f9b1b874159527bafefd0 0.2.7
a17a1e69ca0519c1bb5f9b1b874159527bafefd0 0.2.7
c4c13c836c8b153b18b416dd06828a43f503528b 0.2.7
+19
View File
@@ -0,0 +1,19 @@
Primary Authors:
* Matt Ronge
Contributors:
* Stefano Barbato - For a patch that fixes a memory leak
* Jaremy Creechley - Added support for sending attachments
* Julián Romero - For a patch that adds unicode support for addresses
* Kyle Van Essen - For a patch that fixes a flags memory leak
* Gabor Cselle - For tons of contributions, especially iPhone support and bug fixes
* Juan Leon - For adding async SMTP support
* Matthew R. Miller - For move message support and date utilities
* Kaustubh Kabra - For HTML mail support
* Dirk Holtwick - For updating the examples
Thanks to:
* Dinh Viet Hoa - For writing libetpan, which made MailCore possible
@@ -1,45 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IBClasses</key>
<array>
<dict>
<key>CLASS</key>
<string>FirstResponder</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSObject</string>
</dict>
<dict>
<key>ACTIONS</key>
<dict>
<key>connect</key>
<string>id</string>
</dict>
<key>CLASS</key>
<string>MyController</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>OUTLETS</key>
<dict>
<key>password</key>
<string>id</string>
<key>port</key>
<string>id</string>
<key>server</key>
<string>id</string>
<key>useTLS</key>
<string>id</string>
<key>username</key>
<string>id</string>
</dict>
<key>SUPERCLASS</key>
<string>NSObject</string>
</dict>
</array>
<key>IBVersion</key>
<string>1</string>
</dict>
</plist>
-21
View File
@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IBFramework Version</key>
<string>677</string>
<key>IBLastKnownRelativeProjectPath</key>
<string>../InboxLister.xcodeproj</string>
<key>IBOldestOS</key>
<integer>5</integer>
<key>IBOpenObjects</key>
<array>
<integer>29</integer>
<integer>2</integer>
</array>
<key>IBSystem Version</key>
<string>9J61</string>
<key>targetFramework</key>
<string>IBCocoaFramework</string>
</dict>
</plist>
Binary file not shown.
-67
View File
@@ -1,67 +0,0 @@
#import "MyController.h"
@implementation MyController
- (id)init
{
self = [super init];
if(self)
{
myAccount = [[CTCoreAccount alloc] init];
myMessages = [[NSMutableArray alloc] init];
}
return self;
}
- (void)dealloc
{
[myAccount release];
[myMessages release];
[super dealloc];
}
- (IBAction)connect:(id)sender
{
NSLog(@"Connecting...");
if ([useTLS state] == NSOnState )
{
[myAccount connectToServer:[server stringValue] port:[port intValue] connectionType:CONNECTION_TYPE_TLS
authType:IMAP_AUTH_TYPE_PLAIN login:[username stringValue] password:[password stringValue]];
}
else
{
[myAccount connectToServer:[server stringValue] port:[port intValue] connectionType:CONNECTION_TYPE_PLAIN
authType:IMAP_AUTH_TYPE_PLAIN login:[username stringValue] password:[password stringValue]];
}
CTCoreFolder *inbox = [myAccount folderWithPath:@"INBOX"];
NSLog(@"INBOX %@", inbox);
// set the toIndex to 0 so all messages are loaded
NSSet *messageSet = [inbox messageObjectsFromIndex:1 toIndex:0];
NSLog(@"Done getting list of messages...");
NSMutableSet *messagesProxy = [self mutableSetValueForKey:@"messages"];
NSEnumerator *objEnum = [messageSet objectEnumerator];
id msg;
while(msg = [objEnum nextObject]) {
[msg fetchBody];
[messagesProxy addObject:msg];
}
}
- (NSMutableSet *)messages
{
return myMessages;
}
- (void)setMessages:(NSMutableSet *)messages
{
[messages retain];
[myMessages release];
myMessages = messages;
}
@end
@@ -1,20 +0,0 @@
{
IBClasses = (
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
{
ACTIONS = {sendMessage = id; };
CLASS = MyController;
LANGUAGE = ObjC;
OUTLETS = {
password = id;
port = id;
server = id;
useAuth = id;
useTLS = id;
username = id;
};
SUPERCLASS = NSObject;
}
);
IBVersion = 1;
}
@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
<string>393 113 356 240 0 0 1440 878 </string>
<key>IBEditorPositions</key>
<dict>
<key>29</key>
<string>109 298 338 44 0 0 1440 878 </string>
</dict>
<key>IBFramework Version</key>
<string>446.1</string>
<key>IBOpenObjects</key>
<array>
<integer>29</integer>
<integer>21</integer>
</array>
<key>IBSystem Version</key>
<string>8P2137</string>
</dict>
</plist>
Binary file not shown.
@@ -1,306 +0,0 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 42;
objects = {
/* Begin PBXBuildFile section */
8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 29B97318FDCFA39411CA2CEA /* MainMenu.nib */; };
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
F805A72009D7CD7D0055EFC3 /* MyController.m in Sources */ = {isa = PBXBuildFile; fileRef = F805A71F09D7CD7D0055EFC3 /* MyController.m */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
F805A83009D7CDB80055EFC3 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
29B97319FDCFA39411CA2CEA /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/MainMenu.nib; sourceTree = "<group>"; };
29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
32CA4F630368D1EE00C91783 /* MessageSender_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageSender_Prefix.pch; sourceTree = "<group>"; };
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
8D1107320486CEB800E47090 /* MessageSender.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MessageSender.app; sourceTree = BUILT_PRODUCTS_DIR; };
F805A71E09D7CD7D0055EFC3 /* MyController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MyController.h; sourceTree = "<group>"; };
F805A71F09D7CD7D0055EFC3 /* MyController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = MyController.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
8D11072E0486CEB800E47090 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
080E96DDFE201D6D7F000001 /* Classes */ = {
isa = PBXGroup;
children = (
F805A71E09D7CD7D0055EFC3 /* MyController.h */,
F805A71F09D7CD7D0055EFC3 /* MyController.m */,
);
name = Classes;
sourceTree = "<group>";
};
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
isa = PBXGroup;
children = (
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
);
name = "Linked Frameworks";
sourceTree = "<group>";
};
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
isa = PBXGroup;
children = (
29B97324FDCFA39411CA2CEA /* AppKit.framework */,
13E42FB307B3F0F600E4EEF1 /* CoreData.framework */,
29B97325FDCFA39411CA2CEA /* Foundation.framework */,
);
name = "Other Frameworks";
sourceTree = "<group>";
};
19C28FACFE9D520D11CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
8D1107320486CEB800E47090 /* MessageSender.app */,
);
name = Products;
sourceTree = "<group>";
};
29B97314FDCFA39411CA2CEA /* MessageSender */ = {
isa = PBXGroup;
children = (
080E96DDFE201D6D7F000001 /* Classes */,
29B97315FDCFA39411CA2CEA /* Other Sources */,
29B97317FDCFA39411CA2CEA /* Resources */,
29B97323FDCFA39411CA2CEA /* Frameworks */,
19C28FACFE9D520D11CA2CBB /* Products */,
);
name = MessageSender;
sourceTree = "<group>";
};
29B97315FDCFA39411CA2CEA /* Other Sources */ = {
isa = PBXGroup;
children = (
32CA4F630368D1EE00C91783 /* MessageSender_Prefix.pch */,
29B97316FDCFA39411CA2CEA /* main.m */,
);
name = "Other Sources";
sourceTree = "<group>";
};
29B97317FDCFA39411CA2CEA /* Resources */ = {
isa = PBXGroup;
children = (
8D1107310486CEB800E47090 /* Info.plist */,
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
29B97318FDCFA39411CA2CEA /* MainMenu.nib */,
);
name = Resources;
sourceTree = "<group>";
};
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
isa = PBXGroup;
children = (
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
8D1107260486CEB800E47090 /* MessageSender */ = {
isa = PBXNativeTarget;
buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "MessageSender" */;
buildPhases = (
8D1107290486CEB800E47090 /* Resources */,
8D11072C0486CEB800E47090 /* Sources */,
8D11072E0486CEB800E47090 /* Frameworks */,
F805A83009D7CDB80055EFC3 /* CopyFiles */,
);
buildRules = (
);
dependencies = (
);
name = MessageSender;
productInstallPath = "$(HOME)/Applications";
productName = MessageSender;
productReference = 8D1107320486CEB800E47090 /* MessageSender.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "MessageSender" */;
compatibilityVersion = "Xcode 2.4";
hasScannedForEncodings = 1;
mainGroup = 29B97314FDCFA39411CA2CEA /* MessageSender */;
projectDirPath = "";
projectRoot = "";
targets = (
8D1107260486CEB800E47090 /* MessageSender */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
8D1107290486CEB800E47090 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */,
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
8D11072C0486CEB800E47090 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8D11072D0486CEB800E47090 /* main.m in Sources */,
F805A72009D7CD7D0055EFC3 /* MyController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
089C165DFE840E0CC02AAC07 /* English */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
29B97318FDCFA39411CA2CEA /* MainMenu.nib */ = {
isa = PBXVariantGroup;
children = (
29B97319FDCFA39411CA2CEA /* English */,
);
name = MainMenu.nib;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
C01FCF4B08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(FRAMEWORK_SEARCH_PATHS)",
"$(SRCROOT)/../../build/Debug",
"$(SRCROOT)/../../build/Release",
"$(SRCROOT)/../..",
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
);
FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../../Library/Frameworks\"";
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Applications";
PRODUCT_NAME = MessageSender;
WRAPPER_EXTENSION = app;
ZERO_LINK = YES;
};
name = Debug;
};
C01FCF4C08A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = (
ppc,
i386,
);
FRAMEWORK_SEARCH_PATHS = (
"$(FRAMEWORK_SEARCH_PATHS)",
"$(SRCROOT)/../../build/Debug",
"$(SRCROOT)/../../build/Release",
"$(SRCROOT)/../..",
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
);
FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../../Library/Frameworks\"";
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_MODEL_TUNING = G5;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Applications";
PRODUCT_NAME = MessageSender;
WRAPPER_EXTENSION = app;
};
name = Release;
};
C01FCF4F08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
PREBINDING = NO;
SDKROOT = /Developer/SDKs/MacOSX10.5.sdk;
};
name = Debug;
};
C01FCF5008A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
PREBINDING = NO;
SDKROOT = /Developer/SDKs/MacOSX10.5.sdk;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "MessageSender" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C01FCF4B08A954540054247B /* Debug */,
C01FCF4C08A954540054247B /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
C01FCF4E08A954540054247B /* Build configuration list for PBXProject "MessageSender" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C01FCF4F08A954540054247B /* Debug */,
C01FCF5008A954540054247B /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
}
-27
View File
@@ -1,27 +0,0 @@
/* MyController */
#import <Cocoa/Cocoa.h>
#import <MailCore/MailCore.h>
@interface MyController : NSObject
{
IBOutlet id password;
IBOutlet id port;
IBOutlet id server;
IBOutlet id username;
IBOutlet id useAuth;
IBOutlet id useTLS;
CTCoreMessage *myMessage;
}
- (IBAction)sendMessage:(id)sender;
- (NSString *)to;
- (void)setTo:(NSString *)aValue;
- (NSString *)from;
- (void)setFrom:(NSString *)aValue;
- (NSString *)subject;
- (void)setSubject:(NSString *)aValue;
- (NSString *)body;
- (void)setBody:(NSString *)aValue;
@end
-79
View File
@@ -1,79 +0,0 @@
#import "MyController.h"
@implementation MyController
- (id)init
{
self = [super init];
if(self)
{
myMessage = [[CTCoreMessage alloc] init];
}
return self;
}
- (void)dealloc
{
[myMessage release];
[super dealloc];
}
- (IBAction)sendMessage:(id)sender
{
CTCoreMessage *msg = [[CTCoreMessage alloc] init];
[msg setTo:[myMessage to]];
[msg setFrom:[myMessage from]];
[msg setBody:[myMessage body]];
[msg setSubject:[myMessage subject]];
BOOL auth = ([useAuth state] == NSOnState);
BOOL tls = ([useTLS state] == NSOnState);
[CTSMTPConnection sendMessage:msg server:[server stringValue] username:[username stringValue]
password:[password stringValue] port:[port intValue] useTLS:tls useAuth:auth];
[msg release];
}
- (NSString *)to
{
return [[[myMessage to] anyObject] email];
}
- (void)setTo:(NSString *)aValue
{
CTCoreAddress *addr = [CTCoreAddress address];
[addr setEmail:aValue];
[myMessage setTo:[NSSet setWithObject:addr]];
}
- (NSString *)from
{
return [[[myMessage from] anyObject] email];
}
- (void)setFrom:(NSString *)aValue
{
CTCoreAddress *addr = [CTCoreAddress address];
[addr setEmail:aValue];
[addr setName:@""];
[myMessage setFrom:[NSSet setWithObject:addr]];
}
- (NSString *)subject
{
return [myMessage subject];
}
- (void)setSubject:(NSString *)aValue
{
[myMessage setSubject:aValue];
}
- (NSString *)body
{
return [myMessage body];
}
- (void)setBody:(NSString *)aValue
{
[myMessage setBody:aValue];
}
@end
-14
View File
@@ -1,14 +0,0 @@
//
// main.m
// MessageSender
//
// Created by Matt Ronge on 3/26/06.
// Copyright Cotingent 2006. All rights reserved.
//
#import <Cocoa/Cocoa.h>
int main(int argc, char *argv[])
{
return NSApplicationMain(argc, (const char **) argv);
}
File diff suppressed because it is too large Load Diff
@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 42;
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
@@ -11,17 +11,45 @@
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
F8A2FAEB144FAAB600C03DB4 /* MailCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8A2FAE4144FAA8E00C03DB4 /* MailCore.framework */; };
F8A2FAED144FAAEE00C03DB4 /* MailCore.framework in Copy Files (1 item) */ = {isa = PBXBuildFile; fileRef = F8A2FAE4144FAA8E00C03DB4 /* MailCore.framework */; };
F8FF333E09D272810051FC62 /* MyController.m in Sources */ = {isa = PBXBuildFile; fileRef = F8FF333D09D272810051FC62 /* MyController.m */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
F8A2FAE3144FAA8E00C03DB4 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = F8A2FACE144FAA8D00C03DB4 /* MailCore.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 8DC2EF5B0486A6940098B216;
remoteInfo = MailCore;
};
F8A2FAE5144FAA8E00C03DB4 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = F8A2FACE144FAA8D00C03DB4 /* MailCore.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = F82D7C810F48AC8500ADA65C;
remoteInfo = Tests;
};
F8A2FAE7144FAA8E00C03DB4 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = F8A2FACE144FAA8D00C03DB4 /* MailCore.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = F8618B5710DADB5C00C41188;
remoteInfo = "MailCore iOS";
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
F8FF33DB09D2734E0051FC62 /* CopyFiles */ = {
F8FF33DB09D2734E0051FC62 /* Copy Files (1 item) */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
F8A2FAED144FAAEE00C03DB4 /* MailCore.framework in Copy Files (1 item) */,
);
name = "Copy Files (1 item)";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
@@ -37,6 +65,8 @@
32CA4F630368D1EE00C91783 /* InboxLister_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InboxLister_Prefix.pch; sourceTree = "<group>"; };
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
8D1107320486CEB800E47090 /* InboxLister.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = InboxLister.app; sourceTree = BUILT_PRODUCTS_DIR; };
F856BE1613779B5000D9C2ED /* MailCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MailCore.framework; path = ../../build/Debug/MailCore.framework; sourceTree = "<group>"; };
F8A2FACE144FAA8D00C03DB4 /* MailCore.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = MailCore.xcodeproj; path = ../../../MailCore.xcodeproj; sourceTree = "<group>"; };
F8FF333C09D272810051FC62 /* MyController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MyController.h; sourceTree = "<group>"; };
F8FF333D09D272810051FC62 /* MyController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = MyController.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
@@ -46,6 +76,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
F8A2FAEB144FAAB600C03DB4 /* MailCore.framework in Frameworks */,
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -56,6 +87,8 @@
080E96DDFE201D6D7F000001 /* Classes */ = {
isa = PBXGroup;
children = (
F8FF333D09D272810051FC62 /* MyController.m */,
F8FF333C09D272810051FC62 /* MyController.h */,
);
name = Classes;
sourceTree = "<group>";
@@ -63,6 +96,7 @@
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
isa = PBXGroup;
children = (
F856BE1613779B5000D9C2ED /* MailCore.framework */,
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
);
name = "Linked Frameworks";
@@ -89,6 +123,7 @@
29B97314FDCFA39411CA2CEA /* InboxLister */ = {
isa = PBXGroup;
children = (
F8A2FACE144FAA8D00C03DB4 /* MailCore.xcodeproj */,
080E96DDFE201D6D7F000001 /* Classes */,
29B97315FDCFA39411CA2CEA /* Other Sources */,
29B97317FDCFA39411CA2CEA /* Resources */,
@@ -103,8 +138,6 @@
children = (
32CA4F630368D1EE00C91783 /* InboxLister_Prefix.pch */,
29B97316FDCFA39411CA2CEA /* main.m */,
F8FF333C09D272810051FC62 /* MyController.h */,
F8FF333D09D272810051FC62 /* MyController.m */,
);
name = "Other Sources";
sourceTree = "<group>";
@@ -128,6 +161,16 @@
name = Frameworks;
sourceTree = "<group>";
};
F8A2FACF144FAA8D00C03DB4 /* Products */ = {
isa = PBXGroup;
children = (
F8A2FAE4144FAA8E00C03DB4 /* MailCore.framework */,
F8A2FAE8144FAA8E00C03DB4 /* libmailcore.a */,
F8A2FAE6144FAA8E00C03DB4 /* Tests.octest */,
);
name = Products;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@@ -138,7 +181,7 @@
8D1107290486CEB800E47090 /* Resources */,
8D11072C0486CEB800E47090 /* Sources */,
8D11072E0486CEB800E47090 /* Frameworks */,
F8FF33DB09D2734E0051FC62 /* CopyFiles */,
F8FF33DB09D2734E0051FC62 /* Copy Files (1 item) */,
);
buildRules = (
);
@@ -155,11 +198,24 @@
/* Begin PBXProject section */
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0430;
};
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "InboxLister" */;
compatibilityVersion = "Xcode 2.4";
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
en,
);
mainGroup = 29B97314FDCFA39411CA2CEA /* InboxLister */;
projectDirPath = "";
projectReferences = (
{
ProductGroup = F8A2FACF144FAA8D00C03DB4 /* Products */;
ProjectRef = F8A2FACE144FAA8D00C03DB4 /* MailCore.xcodeproj */;
},
);
projectRoot = "";
targets = (
8D1107260486CEB800E47090 /* InboxLister */,
@@ -167,6 +223,30 @@
};
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
F8A2FAE4144FAA8E00C03DB4 /* MailCore.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = MailCore.framework;
remoteRef = F8A2FAE3144FAA8E00C03DB4 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F8A2FAE6144FAA8E00C03DB4 /* Tests.octest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = Tests.octest;
remoteRef = F8A2FAE5144FAA8E00C03DB4 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F8A2FAE8144FAA8E00C03DB4 /* libmailcore.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libmailcore.a;
remoteRef = F8A2FAE7144FAA8E00C03DB4 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
/* Begin PBXResourcesBuildPhase section */
8D1107290486CEB800E47090 /* Resources */ = {
isa = PBXResourcesBuildPhase;
@@ -214,21 +294,18 @@
C01FCF4B08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
COPY_PHASE_STRIP = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(FRAMEWORK_SEARCH_PATHS)",
"$(SRCROOT)/../../build/Debug",
"$(SRCROOT)/../../build/Release",
"$(SRCROOT)/../..",
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
);
FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../../Library/Frameworks\"";
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
HEADER_SEARCH_PATHS = (
"$(SRCROOT)/../../../libetpan/build-mac/include",
"$(SRCROOT)/../../../include/",
);
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Applications";
MACOSX_DEPLOYMENT_TARGET = 10.7;
PRODUCT_NAME = InboxLister;
WRAPPER_EXTENSION = app;
ZERO_LINK = YES;
@@ -238,22 +315,16 @@
C01FCF4C08A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = (
ppc,
i386,
);
FRAMEWORK_SEARCH_PATHS = (
"$(FRAMEWORK_SEARCH_PATHS)",
"$(SRCROOT)/../../build/Debug",
"$(SRCROOT)/../../build/Release",
"$(SRCROOT)/../..",
"$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
);
FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../../Library/Frameworks\"";
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_MODEL_TUNING = G5;
HEADER_SEARCH_PATHS = (
"$(SRCROOT)/../../../libetpan/build-mac/include",
"$(SRCROOT)/../../../include/",
);
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Applications";
MACOSX_DEPLOYMENT_TARGET = 10.7;
PRODUCT_NAME = InboxLister;
WRAPPER_EXTENSION = app;
};
@@ -264,8 +335,7 @@
buildSettings = {
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
PREBINDING = NO;
SDKROOT = /Developer/SDKs/MacOSX10.5.sdk;
SDKROOT = macosx;
};
name = Debug;
};
@@ -274,8 +344,7 @@
buildSettings = {
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
PREBINDING = NO;
SDKROOT = /Developer/SDKs/MacOSX10.5.sdk;
SDKROOT = macosx;
};
name = Release;
};
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:InboxLister.xcodeproj">
</FileRef>
</Workspace>
@@ -9,12 +9,12 @@
IBOutlet id port;
IBOutlet id server;
IBOutlet id username;
IBOutlet id useTLS;
IBOutlet id useTLS;
CTCoreAccount *myAccount;
NSMutableSet *myMessages;
CTCoreAccount *myAccount;
NSMutableArray *myMessages;
}
- (IBAction)connect:(id)sender;
- (NSMutableSet *)messages;
- (void)setMessages:(NSMutableSet *)messages;
- (NSMutableArray *)messages;
- (void)setMessages:(NSMutableArray *)messages;
@end
+74
View File
@@ -0,0 +1,74 @@
#import "MyController.h"
@implementation MyController
- (id)init
{
self = [super init];
if(self)
{
myAccount = [[CTCoreAccount alloc] init];
myMessages = [[NSMutableArray alloc] init];
}
return self;
}
- (void)dealloc
{
[myAccount release];
[myMessages release];
[super dealloc];
}
- (IBAction)connect:(id)sender
{
NSLog(@"Connecting...");
int portNumber = [port intValue];
BOOL ssl = [useTLS state] == NSOnState;
[myAccount connectToServer:[server stringValue]
port:portNumber > 0 ? portNumber : 993
connectionType:ssl ? CONNECTION_TYPE_TLS : CONNECTION_TYPE_PLAIN
authType:IMAP_AUTH_TYPE_PLAIN
login:[username stringValue]
password:[password stringValue]];
if(![myAccount isConnected]) {
NSRunCriticalAlertPanel(@"Connection Error", @"Please check your connection details and try again.", @"OK", nil, nil);
return;
}
// NSLog(@"Folders %@", [myAccount allFolders]);
CTCoreFolder *inbox = [myAccount folderWithPath:@"INBOX"];
NSLog(@"INBOX %@", inbox);
// set the toIndex to 0 so all messages are loaded
NSArray *messageSet = [inbox messagesFromSequenceNumber:1 to:0 withFetchAttributes:CTFetchAttrEnvelope];
NSLog(@"Done getting list of messages... %@", messageSet);
NSMutableSet *messagesProxy = [self mutableSetValueForKey:@"messages"];
NSEnumerator *objEnum = [messageSet objectEnumerator];
id msg;
while(msg = [objEnum nextObject]) {
[msg fetchBodyStructure];
[messagesProxy addObject:msg];
}
}
- (NSMutableArray *)messages
{
return myMessages;
}
- (void)setMessages:(NSMutableArray *)messages
{
[messages retain];
[myMessages release];
myMessages = messages;
}
@end
@@ -0,0 +1,388 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
F8FF34BD15A34C98000C5541 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8FF34BC15A34C98000C5541 /* Cocoa.framework */; };
F8FF34C715A34C98000C5541 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = F8FF34C515A34C98000C5541 /* InfoPlist.strings */; };
F8FF34C915A34C98000C5541 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = F8FF34C815A34C98000C5541 /* main.m */; };
F8FF34CD15A34C98000C5541 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = F8FF34CB15A34C98000C5541 /* Credits.rtf */; };
F8FF34D015A34C98000C5541 /* CTAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F8FF34CF15A34C98000C5541 /* CTAppDelegate.m */; };
F8FF34D315A34C98000C5541 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = F8FF34D115A34C98000C5541 /* MainMenu.xib */; };
F8FF34FF15A34D08000C5541 /* MailCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8FF34F515A34CDC000C5541 /* MailCore.framework */; };
F8FF350115A34D4C000C5541 /* MailCore.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = F8FF34F515A34CDC000C5541 /* MailCore.framework */; };
F8FF350415A34DC0000C5541 /* CTMyController.m in Sources */ = {isa = PBXBuildFile; fileRef = F8FF350315A34DB0000C5541 /* CTMyController.m */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
F8FF34F415A34CDC000C5541 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = F8FF34DD15A34CDC000C5541 /* MailCore.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 8DC2EF5B0486A6940098B216;
remoteInfo = MailCore;
};
F8FF34F615A34CDC000C5541 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = F8FF34DD15A34CDC000C5541 /* MailCore.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = F8618B5710DADB5C00C41188;
remoteInfo = "MailCore iOS";
};
F8FF34F815A34CDC000C5541 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = F8FF34DD15A34CDC000C5541 /* MailCore.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = F8DFCF4915801A5000C01975;
remoteInfo = Tests;
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
F8FF350015A34D40000C5541 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
F8FF350115A34D4C000C5541 /* MailCore.framework in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
F8FF34B815A34C98000C5541 /* MessageSender.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MessageSender.app; sourceTree = BUILT_PRODUCTS_DIR; };
F8FF34BC15A34C98000C5541 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
F8FF34BF15A34C98000C5541 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
F8FF34C015A34C98000C5541 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
F8FF34C115A34C98000C5541 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
F8FF34C415A34C98000C5541 /* MessageSender-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "MessageSender-Info.plist"; sourceTree = "<group>"; };
F8FF34C615A34C98000C5541 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
F8FF34C815A34C98000C5541 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
F8FF34CA15A34C98000C5541 /* MessageSender-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MessageSender-Prefix.pch"; sourceTree = "<group>"; };
F8FF34CC15A34C98000C5541 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = "<group>"; };
F8FF34CE15A34C98000C5541 /* CTAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CTAppDelegate.h; sourceTree = "<group>"; };
F8FF34CF15A34C98000C5541 /* CTAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CTAppDelegate.m; sourceTree = "<group>"; };
F8FF34D215A34C98000C5541 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = "<group>"; };
F8FF34DD15A34CDC000C5541 /* MailCore.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = MailCore.xcodeproj; path = ../../../MailCore.xcodeproj; sourceTree = "<group>"; };
F8FF350215A34DB0000C5541 /* CTMyController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CTMyController.h; sourceTree = "<group>"; };
F8FF350315A34DB0000C5541 /* CTMyController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CTMyController.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
F8FF34B515A34C97000C5541 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
F8FF34FF15A34D08000C5541 /* MailCore.framework in Frameworks */,
F8FF34BD15A34C98000C5541 /* Cocoa.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
F8FF34AD15A34C97000C5541 = {
isa = PBXGroup;
children = (
F8FF34DD15A34CDC000C5541 /* MailCore.xcodeproj */,
F8FF34C215A34C98000C5541 /* MessageSender */,
F8FF34BB15A34C98000C5541 /* Frameworks */,
F8FF34B915A34C98000C5541 /* Products */,
);
sourceTree = "<group>";
};
F8FF34B915A34C98000C5541 /* Products */ = {
isa = PBXGroup;
children = (
F8FF34B815A34C98000C5541 /* MessageSender.app */,
);
name = Products;
sourceTree = "<group>";
};
F8FF34BB15A34C98000C5541 /* Frameworks */ = {
isa = PBXGroup;
children = (
F8FF34BC15A34C98000C5541 /* Cocoa.framework */,
F8FF34BE15A34C98000C5541 /* Other Frameworks */,
);
name = Frameworks;
sourceTree = "<group>";
};
F8FF34BE15A34C98000C5541 /* Other Frameworks */ = {
isa = PBXGroup;
children = (
F8FF34BF15A34C98000C5541 /* AppKit.framework */,
F8FF34C015A34C98000C5541 /* CoreData.framework */,
F8FF34C115A34C98000C5541 /* Foundation.framework */,
);
name = "Other Frameworks";
sourceTree = "<group>";
};
F8FF34C215A34C98000C5541 /* MessageSender */ = {
isa = PBXGroup;
children = (
F8FF350215A34DB0000C5541 /* CTMyController.h */,
F8FF350315A34DB0000C5541 /* CTMyController.m */,
F8FF34CE15A34C98000C5541 /* CTAppDelegate.h */,
F8FF34CF15A34C98000C5541 /* CTAppDelegate.m */,
F8FF34D115A34C98000C5541 /* MainMenu.xib */,
F8FF34C315A34C98000C5541 /* Supporting Files */,
);
path = MessageSender;
sourceTree = "<group>";
};
F8FF34C315A34C98000C5541 /* Supporting Files */ = {
isa = PBXGroup;
children = (
F8FF34C415A34C98000C5541 /* MessageSender-Info.plist */,
F8FF34C515A34C98000C5541 /* InfoPlist.strings */,
F8FF34C815A34C98000C5541 /* main.m */,
F8FF34CA15A34C98000C5541 /* MessageSender-Prefix.pch */,
F8FF34CB15A34C98000C5541 /* Credits.rtf */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
F8FF34DE15A34CDC000C5541 /* Products */ = {
isa = PBXGroup;
children = (
F8FF34F515A34CDC000C5541 /* MailCore.framework */,
F8FF34F715A34CDC000C5541 /* libmailcore.a */,
F8FF34F915A34CDC000C5541 /* Tests.octest */,
);
name = Products;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
F8FF34B715A34C97000C5541 /* MessageSender */ = {
isa = PBXNativeTarget;
buildConfigurationList = F8FF34D615A34C98000C5541 /* Build configuration list for PBXNativeTarget "MessageSender" */;
buildPhases = (
F8FF34B415A34C97000C5541 /* Sources */,
F8FF34B515A34C97000C5541 /* Frameworks */,
F8FF34B615A34C97000C5541 /* Resources */,
F8FF350015A34D40000C5541 /* CopyFiles */,
);
buildRules = (
);
dependencies = (
);
name = MessageSender;
productName = MessageSender;
productReference = F8FF34B815A34C98000C5541 /* MessageSender.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
F8FF34AF15A34C97000C5541 /* Project object */ = {
isa = PBXProject;
attributes = {
CLASSPREFIX = CT;
LastUpgradeCheck = 0430;
};
buildConfigurationList = F8FF34B215A34C97000C5541 /* Build configuration list for PBXProject "MessageSender" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = F8FF34AD15A34C97000C5541;
productRefGroup = F8FF34B915A34C98000C5541 /* Products */;
projectDirPath = "";
projectReferences = (
{
ProductGroup = F8FF34DE15A34CDC000C5541 /* Products */;
ProjectRef = F8FF34DD15A34CDC000C5541 /* MailCore.xcodeproj */;
},
);
projectRoot = "";
targets = (
F8FF34B715A34C97000C5541 /* MessageSender */,
);
};
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
F8FF34F515A34CDC000C5541 /* MailCore.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = MailCore.framework;
remoteRef = F8FF34F415A34CDC000C5541 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F8FF34F715A34CDC000C5541 /* libmailcore.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libmailcore.a;
remoteRef = F8FF34F615A34CDC000C5541 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F8FF34F915A34CDC000C5541 /* Tests.octest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = Tests.octest;
remoteRef = F8FF34F815A34CDC000C5541 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
/* Begin PBXResourcesBuildPhase section */
F8FF34B615A34C97000C5541 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
F8FF34C715A34C98000C5541 /* InfoPlist.strings in Resources */,
F8FF34CD15A34C98000C5541 /* Credits.rtf in Resources */,
F8FF34D315A34C98000C5541 /* MainMenu.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
F8FF34B415A34C97000C5541 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
F8FF34C915A34C98000C5541 /* main.m in Sources */,
F8FF34D015A34C98000C5541 /* CTAppDelegate.m in Sources */,
F8FF350415A34DC0000C5541 /* CTMyController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
F8FF34C515A34C98000C5541 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
F8FF34C615A34C98000C5541 /* en */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
F8FF34CB15A34C98000C5541 /* Credits.rtf */ = {
isa = PBXVariantGroup;
children = (
F8FF34CC15A34C98000C5541 /* en */,
);
name = Credits.rtf;
sourceTree = "<group>";
};
F8FF34D115A34C98000C5541 /* MainMenu.xib */ = {
isa = PBXVariantGroup;
children = (
F8FF34D215A34C98000C5541 /* en */,
);
name = MainMenu.xib;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
F8FF34D415A34C98000C5541 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
};
name = Debug;
};
F8FF34D515A34C98000C5541 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
SDKROOT = macosx;
};
name = Release;
};
F8FF34D715A34C98000C5541 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "MessageSender/MessageSender-Prefix.pch";
HEADER_SEARCH_PATHS = "";
INFOPLIST_FILE = "MessageSender/MessageSender-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
name = Debug;
};
F8FF34D815A34C98000C5541 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "MessageSender/MessageSender-Prefix.pch";
HEADER_SEARCH_PATHS = "";
INFOPLIST_FILE = "MessageSender/MessageSender-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
F8FF34B215A34C97000C5541 /* Build configuration list for PBXProject "MessageSender" */ = {
isa = XCConfigurationList;
buildConfigurations = (
F8FF34D415A34C98000C5541 /* Debug */,
F8FF34D515A34C98000C5541 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
F8FF34D615A34C98000C5541 /* Build configuration list for PBXNativeTarget "MessageSender" */ = {
isa = XCConfigurationList;
buildConfigurations = (
F8FF34D715A34C98000C5541 /* Debug */,
F8FF34D815A34C98000C5541 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = F8FF34AF15A34C97000C5541 /* Project object */;
}
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:MessageSender.xcodeproj">
</FileRef>
</Workspace>
@@ -0,0 +1,15 @@
//
// CTAppDelegate.h
// MessageSender
//
// Created by Matt Ronge on 7/3/12.
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@interface CTAppDelegate : NSObject <NSApplicationDelegate>
@property (assign) IBOutlet NSWindow *window;
@end
@@ -0,0 +1,20 @@
//
// CTAppDelegate.m
// MessageSender
//
// Created by Matt Ronge on 7/3/12.
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//
#import "CTAppDelegate.h"
@implementation CTAppDelegate
@synthesize window = _window;
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
// Insert code here to initialize your application
}
@end
@@ -0,0 +1,22 @@
/* MyController */
#import <Cocoa/Cocoa.h>
#import <MailCore/MailCore.h>
@interface CTMyController : NSObject
{
IBOutlet NSTextField *password;
IBOutlet NSTextField *port;
IBOutlet NSTextField *server;
IBOutlet NSTextField *username;
IBOutlet NSButton *useAuth;
IBOutlet NSButton *useTLS;
IBOutlet NSTextField *to;
IBOutlet NSTextField *from;
IBOutlet NSTextField *subject;
IBOutlet NSTextField *body;
}
- (IBAction)sendMessage:(id)sender;
@end
@@ -0,0 +1,39 @@
#import "CTMyController.h"
@implementation CTMyController
- (IBAction)sendMessage:(id)sender {
CTCoreMessage *msg = [[CTCoreMessage alloc] init];
CTCoreAddress *toAddr = [CTCoreAddress address];
[toAddr setEmail:to.stringValue];
[msg setTo:[NSSet setWithObject:toAddr]];
CTCoreAddress *fromAddr = [CTCoreAddress address];
[fromAddr setEmail:from.stringValue];
[fromAddr setName:@""];
[msg setFrom:[NSSet setWithObject:fromAddr]];
[msg setSubject:subject.stringValue];
[msg setBody:body.stringValue];
BOOL auth = ([useAuth state] == NSOnState);
BOOL tls = ([useTLS state] == NSOnState);
NSString *serverValue = server.stringValue;
NSString *usernameValue = username.stringValue;
NSString *passwordValue = password.stringValue;
int portValue = port.intValue;
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
NSError *error;
BOOL success = [CTSMTPConnection sendMessage:msg server:serverValue username:usernameValue
password:passwordValue port:portValue useTLS:tls useAuth:auth error:&error];
if (!success) {
dispatch_async(dispatch_get_main_queue(), ^{
[NSApp presentError:error];
});
}
});
}
@end
@@ -1,25 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<string>en</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.MessageSender</string>
<string>centralatomics.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<string>1</string>
<key>LSMinimumSystemVersion</key>
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2012 __MyCompanyName__. All rights reserved.</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
@@ -0,0 +1,29 @@
{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;}
{\colortbl;\red255\green255\blue255;}
\paperw9840\paperh8400
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\f0\b\fs24 \cf0 Engineering:
\b0 \
Some people\
\
\b Human Interface Design:
\b0 \
Some other people\
\
\b Testing:
\b0 \
Hopefully not nobody\
\
\b Documentation:
\b0 \
Whoever\
\
\b With special thanks to:
\b0 \
Mom\
}
@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,14 @@
//
// main.m
// MessageSender
//
// Created by Matt Ronge on 7/3/12.
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//
#import <Cocoa/Cocoa.h>
int main(int argc, char *argv[])
{
return NSApplicationMain(argc, (const char **)argv);
}
@@ -0,0 +1,515 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
F81524F5144FA4A5007ABA9C /* libssl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F851FBC3144D13A5003F58D4 /* libssl.a */; };
F851FBB3144D134C003F58D4 /* libetpan_ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F851FBB2144D133D003F58D4 /* libetpan_ios.a */; };
F851FBBB144D1391003F58D4 /* libsasl2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F851FBBA144D1382003F58D4 /* libsasl2.a */; };
F851FBC6144D13B8003F58D4 /* libcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F851FBC5144D13A5003F58D4 /* libcrypto.a */; };
F8919583144D0BF000EADD16 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8919582144D0BF000EADD16 /* UIKit.framework */; };
F8919585144D0BF000EADD16 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8919584144D0BF000EADD16 /* Foundation.framework */; };
F8919587144D0BF000EADD16 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8919586144D0BF000EADD16 /* CoreGraphics.framework */; };
F891958D144D0BF000EADD16 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = F891958B144D0BF000EADD16 /* InfoPlist.strings */; };
F891958F144D0BF000EADD16 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = F891958E144D0BF000EADD16 /* main.m */; };
F8919593144D0BF000EADD16 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F8919592144D0BF000EADD16 /* AppDelegate.m */; };
F8919596144D0BF000EADD16 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F8919595144D0BF000EADD16 /* ViewController.m */; };
F8919599144D0BF000EADD16 /* ViewController_iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = F8919597144D0BF000EADD16 /* ViewController_iPhone.xib */; };
F891959C144D0BF000EADD16 /* ViewController_iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = F891959A144D0BF000EADD16 /* ViewController_iPad.xib */; };
F89195D0144D0CAB00EADD16 /* libmailcore.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F89195CC144D0C8900EADD16 /* libmailcore.a */; };
F89195D7144D0EFA00EADD16 /* libiconv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F89195D6144D0EF900EADD16 /* libiconv.dylib */; };
F8B6D589156EE4BB008DE9EB /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8B6D588156EE4BB008DE9EB /* CFNetwork.framework */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
F851FBAD144D133D003F58D4 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = F851FBA7144D133D003F58D4 /* libetpan.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 8DC2EF5B0486A6940098B216;
remoteInfo = libetpan;
};
F851FBB1144D133D003F58D4 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = F851FBA7144D133D003F58D4 /* libetpan.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = F8B2455E144B8C48002B56DA;
remoteInfo = "static libetpan iOS";
};
F851FBB9144D1382003F58D4 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = F851FBB4144D1381003F58D4 /* Cyrus SASL.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = D2AAC07E0554694100DB518D;
remoteInfo = sasl2;
};
F851FBC2144D13A5003F58D4 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = F851FBBC144D13A4003F58D4 /* openssl.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = D2AAC07E0554694100DB518D;
remoteInfo = ssl;
};
F851FBC4144D13A5003F58D4 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = F851FBBC144D13A4003F58D4 /* openssl.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = A0511C5A127770FD00DE46C4;
remoteInfo = crypto;
};
F89195C7144D0C8900EADD16 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = F89195B2144D0C8800EADD16 /* MailCore.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 8DC2EF5B0486A6940098B216;
remoteInfo = MailCore;
};
F89195C9144D0C8900EADD16 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = F89195B2144D0C8800EADD16 /* MailCore.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = F82D7C810F48AC8500ADA65C;
remoteInfo = Tests;
};
F89195CB144D0C8900EADD16 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = F89195B2144D0C8800EADD16 /* MailCore.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = F8618B5710DADB5C00C41188;
remoteInfo = "MailCore iOS";
};
F8B6D57F156EE463008DE9EB /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = F851FBA7144D133D003F58D4 /* libetpan.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = F8B6D4CC156EE0B6008DE9EB;
remoteInfo = "static libetpan Mac";
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
F851FBA7144D133D003F58D4 /* libetpan.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = libetpan.xcodeproj; path = "../../../libetpan/build-mac/libetpan.xcodeproj"; sourceTree = "<group>"; };
F851FBB4144D1381003F58D4 /* Cyrus SASL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "Cyrus SASL.xcodeproj"; path = "../../../iOSPorts/ports/security/cyrus-sasl/Cyrus SASL.xcodeproj"; sourceTree = "<group>"; };
F851FBBC144D13A4003F58D4 /* openssl.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = openssl.xcodeproj; path = ../../../iOSPorts/ports/security/openssl/openssl.xcodeproj; sourceTree = "<group>"; };
F891957E144D0BF000EADD16 /* MessageSender.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MessageSender.app; sourceTree = BUILT_PRODUCTS_DIR; };
F8919582144D0BF000EADD16 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
F8919584144D0BF000EADD16 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
F8919586144D0BF000EADD16 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
F891958A144D0BF000EADD16 /* MessageSender-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "MessageSender-Info.plist"; sourceTree = "<group>"; };
F891958C144D0BF000EADD16 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
F891958E144D0BF000EADD16 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
F8919590144D0BF000EADD16 /* MessageSender-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MessageSender-Prefix.pch"; sourceTree = "<group>"; };
F8919591144D0BF000EADD16 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
F8919592144D0BF000EADD16 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
F8919594144D0BF000EADD16 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
F8919595144D0BF000EADD16 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
F8919598144D0BF000EADD16 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/ViewController_iPhone.xib; sourceTree = "<group>"; };
F891959B144D0BF000EADD16 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/ViewController_iPad.xib; sourceTree = "<group>"; };
F89195B2144D0C8800EADD16 /* MailCore.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = MailCore.xcodeproj; path = ../../../MailCore.xcodeproj; sourceTree = "<group>"; };
F89195D6144D0EF900EADD16 /* libiconv.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libiconv.dylib; path = usr/lib/libiconv.dylib; sourceTree = SDKROOT; };
F89195D8144D0F0200EADD16 /* libsasl2.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libsasl2.a; path = "../../../iOSPorts/ports/security/cyrus-sasl/build/Debug-iphoneos/libsasl2.a"; sourceTree = "<group>"; };
F89195DA144D0F1000EADD16 /* libcrypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcrypto.a; path = "../../../iOSPorts/ports/security/openssl/build/Debug-iphoneos/libcrypto.a"; sourceTree = "<group>"; };
F8B6D588156EE4BB008DE9EB /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
F891957B144D0BF000EADD16 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
F8B6D589156EE4BB008DE9EB /* CFNetwork.framework in Frameworks */,
F81524F5144FA4A5007ABA9C /* libssl.a in Frameworks */,
F851FBC6144D13B8003F58D4 /* libcrypto.a in Frameworks */,
F851FBBB144D1391003F58D4 /* libsasl2.a in Frameworks */,
F851FBB3144D134C003F58D4 /* libetpan_ios.a in Frameworks */,
F89195D7144D0EFA00EADD16 /* libiconv.dylib in Frameworks */,
F89195D0144D0CAB00EADD16 /* libmailcore.a in Frameworks */,
F8919583144D0BF000EADD16 /* UIKit.framework in Frameworks */,
F8919585144D0BF000EADD16 /* Foundation.framework in Frameworks */,
F8919587144D0BF000EADD16 /* CoreGraphics.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
F851FBA8144D133D003F58D4 /* Products */ = {
isa = PBXGroup;
children = (
F851FBAE144D133D003F58D4 /* libetpan.framework */,
F851FBB2144D133D003F58D4 /* libetpan_ios.a */,
F8B6D580156EE463008DE9EB /* libetpan_mac.a */,
);
name = Products;
sourceTree = "<group>";
};
F851FBB5144D1381003F58D4 /* Products */ = {
isa = PBXGroup;
children = (
F851FBBA144D1382003F58D4 /* libsasl2.a */,
);
name = Products;
sourceTree = "<group>";
};
F851FBBD144D13A4003F58D4 /* Products */ = {
isa = PBXGroup;
children = (
F851FBC3144D13A5003F58D4 /* libssl.a */,
F851FBC5144D13A5003F58D4 /* libcrypto.a */,
);
name = Products;
sourceTree = "<group>";
};
F8919573144D0BEF00EADD16 = {
isa = PBXGroup;
children = (
F8B6D588156EE4BB008DE9EB /* CFNetwork.framework */,
F851FBBC144D13A4003F58D4 /* openssl.xcodeproj */,
F851FBB4144D1381003F58D4 /* Cyrus SASL.xcodeproj */,
F851FBA7144D133D003F58D4 /* libetpan.xcodeproj */,
F89195B2144D0C8800EADD16 /* MailCore.xcodeproj */,
F8919588144D0BF000EADD16 /* MessageSender */,
F8919581144D0BF000EADD16 /* Frameworks */,
F891957F144D0BF000EADD16 /* Products */,
);
sourceTree = "<group>";
};
F891957F144D0BF000EADD16 /* Products */ = {
isa = PBXGroup;
children = (
F891957E144D0BF000EADD16 /* MessageSender.app */,
);
name = Products;
sourceTree = "<group>";
};
F8919581144D0BF000EADD16 /* Frameworks */ = {
isa = PBXGroup;
children = (
F89195DA144D0F1000EADD16 /* libcrypto.a */,
F89195D8144D0F0200EADD16 /* libsasl2.a */,
F89195D6144D0EF900EADD16 /* libiconv.dylib */,
F8919582144D0BF000EADD16 /* UIKit.framework */,
F8919584144D0BF000EADD16 /* Foundation.framework */,
F8919586144D0BF000EADD16 /* CoreGraphics.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
F8919588144D0BF000EADD16 /* MessageSender */ = {
isa = PBXGroup;
children = (
F8919591144D0BF000EADD16 /* AppDelegate.h */,
F8919592144D0BF000EADD16 /* AppDelegate.m */,
F8919594144D0BF000EADD16 /* ViewController.h */,
F8919595144D0BF000EADD16 /* ViewController.m */,
F8919597144D0BF000EADD16 /* ViewController_iPhone.xib */,
F891959A144D0BF000EADD16 /* ViewController_iPad.xib */,
F8919589144D0BF000EADD16 /* Supporting Files */,
);
path = MessageSender;
sourceTree = "<group>";
};
F8919589144D0BF000EADD16 /* Supporting Files */ = {
isa = PBXGroup;
children = (
F891958A144D0BF000EADD16 /* MessageSender-Info.plist */,
F891958B144D0BF000EADD16 /* InfoPlist.strings */,
F891958E144D0BF000EADD16 /* main.m */,
F8919590144D0BF000EADD16 /* MessageSender-Prefix.pch */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
F89195B3144D0C8800EADD16 /* Products */ = {
isa = PBXGroup;
children = (
F89195C8144D0C8900EADD16 /* MailCore.framework */,
F89195CC144D0C8900EADD16 /* libmailcore.a */,
F89195CA144D0C8900EADD16 /* Tests.octest */,
);
name = Products;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
F891957D144D0BF000EADD16 /* MessageSender */ = {
isa = PBXNativeTarget;
buildConfigurationList = F891959F144D0BF000EADD16 /* Build configuration list for PBXNativeTarget "MessageSender" */;
buildPhases = (
F891957A144D0BF000EADD16 /* Sources */,
F891957B144D0BF000EADD16 /* Frameworks */,
F891957C144D0BF000EADD16 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = MessageSender;
productName = MessageSender;
productReference = F891957E144D0BF000EADD16 /* MessageSender.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
F8919575144D0BEF00EADD16 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0420;
};
buildConfigurationList = F8919578144D0BEF00EADD16 /* Build configuration list for PBXProject "MessageSender" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = F8919573144D0BEF00EADD16;
productRefGroup = F891957F144D0BF000EADD16 /* Products */;
projectDirPath = "";
projectReferences = (
{
ProductGroup = F851FBB5144D1381003F58D4 /* Products */;
ProjectRef = F851FBB4144D1381003F58D4 /* Cyrus SASL.xcodeproj */;
},
{
ProductGroup = F851FBA8144D133D003F58D4 /* Products */;
ProjectRef = F851FBA7144D133D003F58D4 /* libetpan.xcodeproj */;
},
{
ProductGroup = F89195B3144D0C8800EADD16 /* Products */;
ProjectRef = F89195B2144D0C8800EADD16 /* MailCore.xcodeproj */;
},
{
ProductGroup = F851FBBD144D13A4003F58D4 /* Products */;
ProjectRef = F851FBBC144D13A4003F58D4 /* openssl.xcodeproj */;
},
);
projectRoot = "";
targets = (
F891957D144D0BF000EADD16 /* MessageSender */,
);
};
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
F851FBAE144D133D003F58D4 /* libetpan.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = libetpan.framework;
remoteRef = F851FBAD144D133D003F58D4 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F851FBB2144D133D003F58D4 /* libetpan_ios.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libetpan_ios.a;
remoteRef = F851FBB1144D133D003F58D4 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F851FBBA144D1382003F58D4 /* libsasl2.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libsasl2.a;
remoteRef = F851FBB9144D1382003F58D4 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F851FBC3144D13A5003F58D4 /* libssl.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libssl.a;
remoteRef = F851FBC2144D13A5003F58D4 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F851FBC5144D13A5003F58D4 /* libcrypto.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libcrypto.a;
remoteRef = F851FBC4144D13A5003F58D4 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F89195C8144D0C8900EADD16 /* MailCore.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = MailCore.framework;
remoteRef = F89195C7144D0C8900EADD16 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F89195CA144D0C8900EADD16 /* Tests.octest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = Tests.octest;
remoteRef = F89195C9144D0C8900EADD16 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F89195CC144D0C8900EADD16 /* libmailcore.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libmailcore.a;
remoteRef = F89195CB144D0C8900EADD16 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F8B6D580156EE463008DE9EB /* libetpan_mac.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libetpan_mac.a;
remoteRef = F8B6D57F156EE463008DE9EB /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
/* Begin PBXResourcesBuildPhase section */
F891957C144D0BF000EADD16 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
F891958D144D0BF000EADD16 /* InfoPlist.strings in Resources */,
F8919599144D0BF000EADD16 /* ViewController_iPhone.xib in Resources */,
F891959C144D0BF000EADD16 /* ViewController_iPad.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
F891957A144D0BF000EADD16 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
F891958F144D0BF000EADD16 /* main.m in Sources */,
F8919593144D0BF000EADD16 /* AppDelegate.m in Sources */,
F8919596144D0BF000EADD16 /* ViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
F891958B144D0BF000EADD16 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
F891958C144D0BF000EADD16 /* en */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
F8919597144D0BF000EADD16 /* ViewController_iPhone.xib */ = {
isa = PBXVariantGroup;
children = (
F8919598144D0BF000EADD16 /* en */,
);
name = ViewController_iPhone.xib;
sourceTree = "<group>";
};
F891959A144D0BF000EADD16 /* ViewController_iPad.xib */ = {
isa = PBXVariantGroup;
children = (
F891959B144D0BF000EADD16 /* en */,
);
name = ViewController_iPad.xib;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
F891959D144D0BF000EADD16 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
F891959E144D0BF000EADD16 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
F89195A0144D0BF000EADD16 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
FRAMEWORK_SEARCH_PATHS = "";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "MessageSender/MessageSender-Prefix.pch";
HEADER_SEARCH_PATHS = "\"$(BUILT_PRODUCTS_DIR)/../../include\"";
INFOPLIST_FILE = "MessageSender/MessageSender-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
name = Debug;
};
F89195A1144D0BF000EADD16 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
FRAMEWORK_SEARCH_PATHS = "";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "MessageSender/MessageSender-Prefix.pch";
HEADER_SEARCH_PATHS = "\"$(BUILT_PRODUCTS_DIR)/../../include\"";
INFOPLIST_FILE = "MessageSender/MessageSender-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
F8919578144D0BEF00EADD16 /* Build configuration list for PBXProject "MessageSender" */ = {
isa = XCConfigurationList;
buildConfigurations = (
F891959D144D0BF000EADD16 /* Debug */,
F891959E144D0BF000EADD16 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
F891959F144D0BF000EADD16 /* Build configuration list for PBXNativeTarget "MessageSender" */ = {
isa = XCConfigurationList;
buildConfigurations = (
F89195A0144D0BF000EADD16 /* Debug */,
F89195A1144D0BF000EADD16 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = F8919575144D0BEF00EADD16 /* Project object */;
}
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:MessageSender.xcodeproj">
</FileRef>
</Workspace>
@@ -0,0 +1,19 @@
//
// AppDelegate.h
// MessageSender
//
// Created by Matthew Ronge on 10/17/11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
#import <UIKit/UIKit.h>
@class ViewController;
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) ViewController *viewController;
@end
@@ -0,0 +1,78 @@
//
// AppDelegate.m
// MessageSender
//
// Created by Matthew Ronge on 10/17/11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
#import "AppDelegate.h"
#import "ViewController.h"
@implementation AppDelegate
@synthesize window = _window;
@synthesize viewController = _viewController;
- (void)dealloc
{
[_window release];
[_viewController release];
[super dealloc];
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
// Override point for customization after application launch.
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
self.viewController = [[[ViewController alloc] initWithNibName:@"ViewController_iPhone" bundle:nil] autorelease];
} else {
self.viewController = [[[ViewController alloc] initWithNibName:@"ViewController_iPad" bundle:nil] autorelease];
}
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
return YES;
}
- (void)applicationWillResignActive:(UIApplication *)application
{
/*
Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
*/
}
- (void)applicationDidEnterBackground:(UIApplication *)application
{
/*
Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
*/
}
- (void)applicationWillEnterForeground:(UIApplication *)application
{
/*
Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
*/
}
- (void)applicationDidBecomeActive:(UIApplication *)application
{
/*
Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
*/
}
- (void)applicationWillTerminate:(UIApplication *)application
{
/*
Called when the application is about to terminate.
Save data if appropriate.
See also applicationDidEnterBackground:.
*/
}
@end
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFiles</key>
<array/>
<key>CFBundleIdentifier</key>
<string>com.example.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
@@ -0,0 +1,14 @@
//
// Prefix header for all source files of the 'MessageSender' target in the 'MessageSender' project
//
#import <Availability.h>
#ifndef __IPHONE_4_0
#warning "This project uses features only available in iOS SDK 4.0 and later."
#endif
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif
@@ -0,0 +1,14 @@
//
// ViewController.h
// MessageSender
//
// Created by Matthew Ronge on 10/17/11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <MailCore/MailCore.h>
@interface ViewController : UIViewController
@end
@@ -0,0 +1,70 @@
//
// ViewController.m
// MessageSender
//
// Created by Matthew Ronge on 10/17/11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
#import "ViewController.h"
@implementation ViewController
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Release any cached data, images, etc that aren't in use.
}
#pragma mark - View lifecycle
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
CTCoreMessage *msg = [[CTCoreMessage alloc] init];
// [CTSMTPConnection sendMessage:msg server:[server stringValue] username:[username stringValue]
// password:[password stringValue] port:[port intValue] useTLS:tls useAuth:auth];
[msg release];
}
- (void)viewDidUnload
{
[super viewDidUnload];
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
}
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
}
- (void)viewWillDisappear:(BOOL)animated
{
[super viewWillDisappear:animated];
}
- (void)viewDidDisappear:(BOOL)animated
{
[super viewDidDisappear:animated];
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
} else {
return YES;
}
}
@end
@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */
@@ -0,0 +1,162 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="8.00">
<data>
<int key="IBDocument.SystemTarget">1280</int>
<string key="IBDocument.SystemVersion">11B26</string>
<string key="IBDocument.InterfaceBuilderVersion">1938</string>
<string key="IBDocument.AppKitVersion">1138</string>
<string key="IBDocument.HIToolboxVersion">566.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="NS.object.0">933</string>
</object>
<array key="IBDocument.IntegratedClassDependencies">
<string>IBProxyObject</string>
<string>IBUIView</string>
<string>IBUILabel</string>
</array>
<array key="IBDocument.PluginDependencies">
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</array>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
<integer value="1" key="NS.object.0"/>
</object>
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<object class="IBProxyObject" id="841351856">
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
<object class="IBProxyObject" id="606714003">
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
<object class="IBUIView" id="766721923">
<reference key="NSNextResponder"/>
<int key="NSvFlags">274</int>
<array class="NSMutableArray" key="NSSubviews">
<object class="IBUILabel" id="943291862">
<reference key="NSNextResponder" ref="766721923"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{281, 342}, {150, 21}}</string>
<reference key="NSSuperview" ref="766721923"/>
<reference key="NSWindow"/>
<string key="NSReuseIdentifierKey">_NS:345</string>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUIContentMode">7</int>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<string key="IBUIText">Nothing to see here</string>
<object class="NSColor" key="IBUITextColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MCAwIDAAA</bytes>
</object>
<nil key="IBUIHighlightedColor"/>
<int key="IBUIBaselineAdjustment">1</int>
<float key="IBUIMinimumFontSize">10</float>
<object class="IBUIFontDescription" key="IBUIFontDescription">
<int key="type">1</int>
<double key="pointSize">17</double>
</object>
<object class="NSFont" key="IBUIFont">
<string key="NSName">Helvetica</string>
<double key="NSSize">17</double>
<int key="NSfFlags">16</int>
</object>
</object>
</array>
<string key="NSFrame">{{0, 20}, {768, 1004}}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
<object class="NSColorSpace" key="NSCustomColorSpace">
<int key="NSID">2</int>
</object>
</object>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics">
<int key="IBUIStatusBarStyle">2</int>
</object>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
</array>
<object class="IBObjectContainer" key="IBDocument.Objects">
<array class="NSMutableArray" key="connectionRecords">
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">view</string>
<reference key="source" ref="841351856"/>
<reference key="destination" ref="766721923"/>
</object>
<int key="connectionID">3</int>
</object>
</array>
<object class="IBMutableOrderedSet" key="objectRecords">
<array key="orderedObjects">
<object class="IBObjectRecord">
<int key="objectID">0</int>
<array key="object" id="0"/>
<reference key="children" ref="1000"/>
<nil key="parent"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">-1</int>
<reference key="object" ref="841351856"/>
<reference key="parent" ref="0"/>
<string key="objectName">File's Owner</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-2</int>
<reference key="object" ref="606714003"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">2</int>
<reference key="object" ref="766721923"/>
<array class="NSMutableArray" key="children">
<reference ref="943291862"/>
</array>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">4</int>
<reference key="object" ref="943291862"/>
<reference key="parent" ref="766721923"/>
</object>
</array>
</object>
<dictionary class="NSMutableDictionary" key="flattenedProperties">
<string key="-1.CustomClassName">ViewController</string>
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="-2.CustomClassName">UIResponder</string>
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="4.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
<int key="maxID">4</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
<object class="IBPartialClassDescription">
<string key="className">ViewController</string>
<string key="superclassName">UIViewController</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/ViewController.h</string>
</object>
</object>
</array>
</object>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBIPadFramework</string>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<string key="IBCocoaTouchPluginVersion">933</string>
</data>
</archive>
@@ -0,0 +1,163 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
<data>
<int key="IBDocument.SystemTarget">1280</int>
<string key="IBDocument.SystemVersion">11B26</string>
<string key="IBDocument.InterfaceBuilderVersion">1938</string>
<string key="IBDocument.AppKitVersion">1138</string>
<string key="IBDocument.HIToolboxVersion">566.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="NS.object.0">933</string>
</object>
<array key="IBDocument.IntegratedClassDependencies">
<string>IBProxyObject</string>
<string>IBUIView</string>
<string>IBUILabel</string>
</array>
<array key="IBDocument.PluginDependencies">
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</array>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
<integer value="1" key="NS.object.0"/>
</object>
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<object class="IBProxyObject" id="372490531">
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBProxyObject" id="843779117">
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBUIView" id="774585933">
<reference key="NSNextResponder"/>
<int key="NSvFlags">274</int>
<array class="NSMutableArray" key="NSSubviews">
<object class="IBUILabel" id="281304688">
<reference key="NSNextResponder" ref="774585933"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{85, 219}, {150, 21}}</string>
<reference key="NSSuperview" ref="774585933"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:328</string>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUIContentMode">7</int>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<string key="IBUIText">Nothing to see here</string>
<object class="NSColor" key="IBUITextColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MCAwIDAAA</bytes>
</object>
<nil key="IBUIHighlightedColor"/>
<int key="IBUIBaselineAdjustment">1</int>
<float key="IBUIMinimumFontSize">10</float>
<object class="IBUIFontDescription" key="IBUIFontDescription">
<int key="type">1</int>
<double key="pointSize">17</double>
</object>
<object class="NSFont" key="IBUIFont">
<string key="NSName">Helvetica</string>
<double key="NSSize">17</double>
<int key="NSfFlags">16</int>
</object>
</object>
</array>
<string key="NSFrame">{{0, 20}, {320, 460}}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="281304688"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC43NQA</bytes>
<object class="NSColorSpace" key="NSCustomColorSpace">
<int key="NSID">2</int>
</object>
</object>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
</array>
<object class="IBObjectContainer" key="IBDocument.Objects">
<array class="NSMutableArray" key="connectionRecords">
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">view</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="774585933"/>
</object>
<int key="connectionID">7</int>
</object>
</array>
<object class="IBMutableOrderedSet" key="objectRecords">
<array key="orderedObjects">
<object class="IBObjectRecord">
<int key="objectID">0</int>
<array key="object" id="0"/>
<reference key="children" ref="1000"/>
<nil key="parent"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">-1</int>
<reference key="object" ref="372490531"/>
<reference key="parent" ref="0"/>
<string key="objectName">File's Owner</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-2</int>
<reference key="object" ref="843779117"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">6</int>
<reference key="object" ref="774585933"/>
<array class="NSMutableArray" key="children">
<reference ref="281304688"/>
</array>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">8</int>
<reference key="object" ref="281304688"/>
<reference key="parent" ref="774585933"/>
</object>
</array>
</object>
<dictionary class="NSMutableDictionary" key="flattenedProperties">
<string key="-1.CustomClassName">ViewController</string>
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="-2.CustomClassName">UIResponder</string>
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="8.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
<int key="maxID">9</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
<object class="IBPartialClassDescription">
<string key="className">ViewController</string>
<string key="superclassName">UIViewController</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/ViewController.h</string>
</object>
</object>
</array>
</object>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<string key="IBCocoaTouchPluginVersion">933</string>
</data>
</archive>
@@ -0,0 +1,18 @@
//
// main.m
// MessageSender
//
// Created by Matthew Ronge on 10/17/11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char *argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
+29
View File
@@ -0,0 +1,29 @@
MailCore
Copyright (C) 2007-2012 Matt Ronge
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the MailCore project nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
File diff suppressed because it is too large Load Diff
-931
View File
@@ -1,931 +0,0 @@
// !$*UTF8*$!
{
0867D690FE84028FC02AAC07 /* Project object */ = {
activeBuildConfigurationName = Release;
activeTarget = 8DC2EF4F0486A6940098B216 /* MailCore */;
addToTargets = (
8DC2EF4F0486A6940098B216 /* MailCore */,
);
breakpoints = (
);
codeSenseManager = F8A70F000C4069C300D1D694 /* Code sense */;
perUserDictionary = {
"PBXConfiguration.PBXBreakpointsDataSource.v1:1CA1AED706398EBD00589147" = {
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
PBXFileTableDataSourceColumnSortingKey = PBXBreakpointsDataSource_BreakpointID;
PBXFileTableDataSourceColumnWidthsKey = (
20,
20,
198,
20,
99,
99,
29,
20,
);
PBXFileTableDataSourceColumnsKey = (
PBXBreakpointsDataSource_ActionID,
PBXBreakpointsDataSource_TypeID,
PBXBreakpointsDataSource_BreakpointID,
PBXBreakpointsDataSource_UseID,
PBXBreakpointsDataSource_LocationID,
PBXBreakpointsDataSource_ConditionID,
PBXBreakpointsDataSource_IgnoreCountID,
PBXBreakpointsDataSource_ContinueID,
);
};
PBXConfiguration.PBXFileTableDataSource3.PBXExecutablesDataSource = {
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
PBXFileTableDataSourceColumnSortingKey = PBXExecutablesDataSource_NameID;
PBXFileTableDataSourceColumnWidthsKey = (
22,
300,
229,
);
PBXFileTableDataSourceColumnsKey = (
PBXExecutablesDataSource_ActiveFlagID,
PBXExecutablesDataSource_NameID,
PBXExecutablesDataSource_CommentsID,
);
};
PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_FiletypeID;
PBXFileTableDataSourceColumnWidthsKey = (
20,
601,
20,
48,
43,
43,
20,
);
PBXFileTableDataSourceColumnsKey = (
PBXFileDataSource_FiletypeID,
PBXFileDataSource_Filename_ColumnID,
PBXFileDataSource_Built_ColumnID,
PBXFileDataSource_ObjectSize_ColumnID,
PBXFileDataSource_Errors_ColumnID,
PBXFileDataSource_Warnings_ColumnID,
PBXFileDataSource_Target_ColumnID,
);
};
PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
PBXFileTableDataSourceColumnWidthsKey = (
20,
561,
60,
20,
48,
43,
43,
);
PBXFileTableDataSourceColumnsKey = (
PBXFileDataSource_FiletypeID,
PBXFileDataSource_Filename_ColumnID,
PBXTargetDataSource_PrimaryAttribute,
PBXFileDataSource_Built_ColumnID,
PBXFileDataSource_ObjectSize_ColumnID,
PBXFileDataSource_Errors_ColumnID,
PBXFileDataSource_Warnings_ColumnID,
);
};
PBXPerProjectTemplateStateSaveDate = 271638751;
PBXWorkspaceStateSaveDate = 271638751;
};
perUserProjectItems = {
F82D7D360F48AD5200ADA65C = F82D7D360F48AD5200ADA65C /* PBXTextBookmark */;
F82D7D370F48AD5200ADA65C = F82D7D370F48AD5200ADA65C /* PBXTextBookmark */;
F82D7D380F48AD5200ADA65C = F82D7D380F48AD5200ADA65C /* PBXTextBookmark */;
F82D7D390F48AD5200ADA65C = F82D7D390F48AD5200ADA65C /* PBXTextBookmark */;
F82D7D4A0F4A0D2500ADA65C = F82D7D4A0F4A0D2500ADA65C /* PBXTextBookmark */;
F82D7D4C0F4A0D2500ADA65C = F82D7D4C0F4A0D2500ADA65C /* PBXTextBookmark */;
F82D7D4E0F4A0D2500ADA65C = F82D7D4E0F4A0D2500ADA65C /* PBXTextBookmark */;
F82D7D4F0F4A0D2500ADA65C = F82D7D4F0F4A0D2500ADA65C /* PBXTextBookmark */;
F82D7D500F4A0D2500ADA65C = F82D7D500F4A0D2500ADA65C /* PBXTextBookmark */;
F82D7D6F0F4A662300ADA65C = F82D7D6F0F4A662300ADA65C /* PBXTextBookmark */;
F82D7D800F4A675300ADA65C = F82D7D800F4A675300ADA65C /* PBXTextBookmark */;
F82D7D8E0F4A67E300ADA65C = F82D7D8E0F4A67E300ADA65C /* PBXTextBookmark */;
F82D7D8F0F4A67E300ADA65C = F82D7D8F0F4A67E300ADA65C /* PBXTextBookmark */;
F846D211102F7D7500E0277B = F846D211102F7D7500E0277B /* PBXTextBookmark */;
F846D212102F7D7500E0277B = F846D212102F7D7500E0277B /* PBXTextBookmark */;
F8EB05EA102FAC0E0073B4B2 = F8EB05EA102FAC0E0073B4B2 /* PBXTextBookmark */;
F8EB05EE102FAC0E0073B4B2 = F8EB05EE102FAC0E0073B4B2 /* PBXTextBookmark */;
F8EB05F8102FAC460073B4B2 = F8EB05F8102FAC460073B4B2 /* PBXTextBookmark */;
F8EB062D102FB4F20073B4B2 = F8EB062D102FB4F20073B4B2 /* PBXTextBookmark */;
F8EB0644102FB7670073B4B2 = F8EB0644102FB7670073B4B2 /* PBXTextBookmark */;
F8EB064E1030E0E30073B4B2 /* PBXTextBookmark */ = F8EB064E1030E0E30073B4B2 /* PBXTextBookmark */;
F8EB065C1030E1760073B4B2 /* PBXTextBookmark */ = F8EB065C1030E1760073B4B2 /* PBXTextBookmark */;
F8EB065D1030E1760073B4B2 /* PBXTextBookmark */ = F8EB065D1030E1760073B4B2 /* PBXTextBookmark */;
F8EB065F1030E1770073B4B2 /* PBXTextBookmark */ = F8EB065F1030E1770073B4B2 /* PBXTextBookmark */;
F8EB06601030E1770073B4B2 /* PBXTextBookmark */ = F8EB06601030E1770073B4B2 /* PBXTextBookmark */;
F8EB06611030E1770073B4B2 /* PBXTextBookmark */ = F8EB06611030E1770073B4B2 /* PBXTextBookmark */;
F8EB06761030F4960073B4B2 /* PBXTextBookmark */ = F8EB06761030F4960073B4B2 /* PBXTextBookmark */;
F8EB06771030F4960073B4B2 /* PBXTextBookmark */ = F8EB06771030F4960073B4B2 /* PBXTextBookmark */;
F8EB06781030F4960073B4B2 /* PBXBookmark */ = F8EB06781030F4960073B4B2 /* PBXBookmark */;
F8EB06791030F4960073B4B2 /* PBXTextBookmark */ = F8EB06791030F4960073B4B2 /* PBXTextBookmark */;
F8EB067A1030F4960073B4B2 /* PBXTextBookmark */ = F8EB067A1030F4960073B4B2 /* PBXTextBookmark */;
F8EB067B1030F4960073B4B2 /* PBXTextBookmark */ = F8EB067B1030F4960073B4B2 /* PBXTextBookmark */;
F8EB07931030F5040073B4B2 /* PBXTextBookmark */ = F8EB07931030F5040073B4B2 /* PBXTextBookmark */;
F8EB07941030F5040073B4B2 /* PBXBookmark */ = F8EB07941030F5040073B4B2 /* PBXBookmark */;
F8EB07951030F5040073B4B2 /* PBXTextBookmark */ = F8EB07951030F5040073B4B2 /* PBXTextBookmark */;
F8EB07961030F5040073B4B2 /* PBXTextBookmark */ = F8EB07961030F5040073B4B2 /* PBXTextBookmark */;
};
sourceControlManager = F8A70EFF0C4069C300D1D694 /* Source Control */;
userBuildSettings = {
};
};
72D117D00C5C181700FE2CB5 /* CTBareMessageTests.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {996, 681}}";
sepNavSelRange = "{628, 0}";
sepNavVisRange = "{0, 1699}";
};
};
72D117D10C5C181700FE2CB5 /* CTBareMessageTests.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1063, 1050}}";
sepNavSelRange = "{628, 0}";
sepNavVisRange = "{77, 2706}";
};
};
8DC2EF4F0486A6940098B216 /* MailCore */ = {
activeExec = 0;
};
F80BDF620A774369003B344E /* maildir.h */ = {
isa = PBXFileReference;
fileEncoding = 30;
lastKnownFileType = sourcecode.c.h;
name = maildir.h;
path = /Users/mronge/Projects/mailcore/OpenSourceProjects/include/libetpan/maildir.h;
sourceTree = "<absolute>";
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {779, 798}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{0, 1607}";
};
};
F81A8AD20C03FC3B002F780A /* CTMIME_MessagePart.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {958, 989}}";
sepNavSelRange = "{1726, 48}";
sepNavVisRange = "{0, 1924}";
};
};
F81A8AD30C03FC3B002F780A /* CTMIME_MessagePart.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {958, 1204}}";
sepNavSelRange = "{2318, 0}";
sepNavVisRange = "{53, 2569}";
};
};
F81A8AD40C03FC3B002F780A /* CTMIME_MultiPart.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {726, 943}}";
sepNavSelRange = "{1694, 0}";
sepNavVisRange = "{0, 1756}";
};
};
F81A8AD50C03FC3B002F780A /* CTMIME_MultiPart.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {958, 1302}}";
sepNavSelRange = "{3035, 5}";
sepNavVisRange = "{1025, 2015}";
};
};
F81A8AD60C03FC3B002F780A /* CTMIME_SinglePart.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {958, 989}}";
sepNavSelRange = "{1991, 0}";
sepNavVisRange = "{0, 2016}";
};
};
F81A8AD70C03FC3B002F780A /* CTMIME_SinglePart.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {958, 2086}}";
sepNavSelRange = "{4214, 0}";
sepNavVisRange = "{2862, 2111}";
};
};
F81A8AD80C03FC3B002F780A /* CTMIME_TextPart.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {726, 943}}";
sepNavSelRange = "{1805, 0}";
sepNavVisRange = "{0, 1810}";
};
};
F81A8AD90C03FC3B002F780A /* CTMIME_TextPart.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {726, 1274}}";
sepNavSelRange = "{3027, 0}";
sepNavVisRange = "{1101, 2095}";
};
};
F81A8ADA0C03FC3B002F780A /* CTMIME.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {726, 943}}";
sepNavSelRange = "{1781, 0}";
sepNavVisRange = "{0, 1980}";
};
};
F81A8ADB0C03FC3B002F780A /* CTMIME.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {958, 1806}}";
sepNavSelRange = "{1721, 0}";
sepNavVisRange = "{2553, 1596}";
};
};
F81A8AEB0C03FC58002F780A /* CTMIMETests.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1019, 574}}";
sepNavSelRange = "{620, 9}";
sepNavVisRange = "{0, 1696}";
sepNavWindowFrame = "{{61, 434}, {1078, 697}}";
};
};
F81A8AEC0C03FC58002F780A /* CTMIMETests.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1046, 2590}}";
sepNavSelRange = "{9152, 0}";
sepNavVisRange = "{220, 4047}";
};
};
F81B88500A74AA7100143DF6 /* CTCoreAccount.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1041, 1386}}";
sepNavSelRange = "{628, 0}";
sepNavVisRange = "{2208, 1654}";
sepNavWindowFrame = "{{63, 87}, {1100, 785}}";
};
};
F81B88510A74AA7100143DF6 /* CTCoreAccount.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {779, 2842}}";
sepNavSelRange = "{628, 0}";
sepNavVisRange = "{0, 1572}";
};
};
F81B88520A74AA7100143DF6 /* CTCoreAddress.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {779, 1036}}";
sepNavSelRange = "{628, 0}";
sepNavVisRange = "{0, 1572}";
sepNavWindowFrame = "{{130, 371}, {1078, 697}}";
};
};
F81B88530A74AA7100143DF6 /* CTCoreAddress.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {996, 1316}}";
sepNavSelRange = "{628, 0}";
sepNavVisRange = "{0, 2017}";
};
};
F81B88540A74AA7100143DF6 /* CTCoreFolder.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {779, 2562}}";
sepNavSelRange = "{3233, 0}";
sepNavVisRange = "{2736, 1096}";
};
};
F81B88550A74AA7100143DF6 /* CTCoreFolder.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {779, 8638}}";
sepNavSelRange = "{6999, 0}";
sepNavVisRange = "{6755, 760}";
sepNavWindowFrame = "{{221, 92}, {1100, 785}}";
};
};
F81B88560A74AA7100143DF6 /* CTCoreMessage.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {726, 2618}}";
sepNavSelRange = "{2272, 0}";
sepNavVisRange = "{590, 2634}";
};
};
F81B88570A74AA7100143DF6 /* CTCoreMessage.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {958, 6636}}";
sepNavSelRange = "{5296, 252}";
sepNavVisRange = "{5137, 2378}";
sepNavWindowFrame = "{{109, 45}, {1100, 785}}";
};
};
F81B885A0A74AA7100143DF6 /* CTSMTPConnection.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {958, 966}}";
sepNavSelRange = "{628, 0}";
sepNavVisRange = "{0, 2813}";
};
};
F81B885B0A74AA7100143DF6 /* CTSMTPConnection.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {996, 1036}}";
sepNavSelRange = "{628, 0}";
sepNavVisRange = "{0, 2185}";
};
};
F81B885C0A74AA7100143DF6 /* MailCore.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1019, 569}}";
sepNavSelRange = "{628, 0}";
sepNavVisRange = "{0, 1811}";
sepNavWindowFrame = "{{107, 392}, {1078, 697}}";
};
};
F81B885D0A74AA7100143DF6 /* MailCoreTypes.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {782, 1456}}";
sepNavSelRange = "{1641, 69}";
sepNavVisRange = "{1576, 2558}";
};
};
F81B88710A74AAD800143DF6 /* MailCore_Prefix.pch */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {996, 681}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{0, 148}";
};
};
F81E26680C6ED35C00B3FBAC /* CTBareAttachment.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {580, 950}}";
sepNavSelRange = "{1978, 0}";
sepNavVisRange = "{0, 1978}";
};
};
F81E26690C6ED35C00B3FBAC /* CTBareAttachment.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {596, 952}}";
sepNavSelRange = "{1999, 0}";
sepNavVisRange = "{1663, 563}";
};
};
F81E266C0C6ED4E100B3FBAC /* CTCoreAttachment.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1063, 967}}";
sepNavSelRange = "{1925, 0}";
sepNavVisRange = "{0, 1925}";
};
};
F81E266D0C6ED4E100B3FBAC /* CTCoreAttachment.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {726, 1204}}";
sepNavSelRange = "{2237, 139}";
sepNavVisRange = "{796, 2106}";
};
};
F81E272D0C6EDC6A00B3FBAC /* CTCoreAttachmentTests.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {996, 681}}";
sepNavSelRange = "{628, 0}";
sepNavVisRange = "{0, 1730}";
};
};
F81E272E0C6EDC6A00B3FBAC /* CTCoreAttachmentTests.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {726, 966}}";
sepNavSelRange = "{2064, 0}";
sepNavVisRange = "{3, 3263}";
};
};
F8245A2F0C04089D005E08A8 /* CTMIMEFactory.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {726, 966}}";
sepNavSelRange = "{0, 1575}";
sepNavVisRange = "{0, 1921}";
};
};
F8245A300C04089D005E08A8 /* CTMIMEFactory.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {777, 1372}}";
sepNavSelRange = "{3113, 0}";
sepNavVisRange = "{2435, 716}";
};
};
F82D7C800F48AC8500ADA65C /* Tests */ = {
activeExec = 0;
};
F82D7D360F48AD5200ADA65C /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = F81A8AEB0C03FC58002F780A /* CTMIMETests.h */;
name = "CTMIMETests.h: 15";
rLen = 9;
rLoc = 620;
rType = 0;
vrLen = 1573;
vrLoc = 0;
};
F82D7D370F48AD5200ADA65C /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = F8EADFB30B3BB178000C8371 /* CTCoreMessageTests.h */;
name = "CTCoreMessageTests.h: 6";
rLen = 0;
rLoc = 79;
rType = 0;
vrLen = 1572;
vrLoc = 0;
};
F82D7D380F48AD5200ADA65C /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = F81A8AEB0C03FC58002F780A /* CTMIMETests.h */;
name = "CTMIMETests.h: 15";
rLen = 9;
rLoc = 620;
rType = 0;
vrLen = 1573;
vrLoc = 0;
};
F82D7D390F48AD5200ADA65C /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = F8EADFB30B3BB178000C8371 /* CTCoreMessageTests.h */;
name = "CTCoreMessageTests.h: 6";
rLen = 0;
rLoc = 79;
rType = 0;
vrLen = 1572;
vrLoc = 0;
};
F82D7D420F49279400ADA65C /* CTCoreAccountTests.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {779, 602}}";
sepNavSelRange = "{1725, 0}";
sepNavVisRange = "{0, 1572}";
};
};
F82D7D430F49279400ADA65C /* CTCoreAccountTests.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {779, 1316}}";
sepNavSelRange = "{3578, 0}";
sepNavVisRange = "{2066, 1221}";
};
};
F82D7D4A0F4A0D2500ADA65C /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = F8EADFB40B3BB178000C8371 /* CTCoreMessageTests.m */;
name = "CTCoreMessageTests.m: 173";
rLen = 0;
rLoc = 8647;
rType = 0;
vrLen = 1352;
vrLoc = 7295;
};
F82D7D4C0F4A0D2500ADA65C /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = F81B88520A74AA7100143DF6 /* CTCoreAddress.h */;
name = "CTCoreAddress.h: 15";
rLen = 0;
rLoc = 628;
rType = 0;
vrLen = 1572;
vrLoc = 0;
};
F82D7D4E0F4A0D2500ADA65C /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = F8EADFB40B3BB178000C8371 /* CTCoreMessageTests.m */;
name = "CTCoreMessageTests.m: 173";
rLen = 0;
rLoc = 8647;
rType = 0;
vrLen = 1352;
vrLoc = 7295;
};
F82D7D4F0F4A0D2500ADA65C /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = F81B88510A74AA7100143DF6 /* CTCoreAccount.m */;
name = "CTCoreAccount.m: 15";
rLen = 0;
rLoc = 628;
rType = 0;
vrLen = 1572;
vrLoc = 0;
};
F82D7D500F4A0D2500ADA65C /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = F81B88520A74AA7100143DF6 /* CTCoreAddress.h */;
name = "CTCoreAddress.h: 15";
rLen = 0;
rLoc = 628;
rType = 0;
vrLen = 1572;
vrLoc = 0;
};
F82D7D6F0F4A662300ADA65C /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = F82D7D420F49279400ADA65C /* CTCoreAccountTests.h */;
name = "CTCoreAccountTests.h: 39";
rLen = 0;
rLoc = 1725;
rType = 0;
vrLen = 1572;
vrLoc = 0;
};
F82D7D7F0F4A675300ADA65C /* RunPlatformUnitTests.include */ = {
isa = PBXFileReference;
lastKnownFileType = text.script.sh;
name = RunPlatformUnitTests.include;
path = /Developer/Tools/RunPlatformUnitTests.include;
sourceTree = "<absolute>";
};
F82D7D800F4A675300ADA65C /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = F82D7D430F49279400ADA65C /* CTCoreAccountTests.m */;
name = "CTCoreAccountTests.m: 58";
rLen = 0;
rLoc = 2454;
rType = 0;
vrLen = 1379;
vrLoc = 590;
};
F82D7D8E0F4A67E300ADA65C /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = F82D7D7F0F4A675300ADA65C /* RunPlatformUnitTests.include */;
name = "RunPlatformUnitTests.include: 387";
rLen = 135;
rLoc = 13188;
rType = 0;
vrLen = 951;
vrLoc = 12689;
};
F82D7D8F0F4A67E300ADA65C /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = F82D7D7F0F4A675300ADA65C /* RunPlatformUnitTests.include */;
name = "RunPlatformUnitTests.include: 387";
rLen = 135;
rLoc = 13188;
rType = 0;
vrLen = 951;
vrLoc = 12689;
};
F8430BAF0C72B16000753941 /* CTMIME_Enumerator.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {726, 966}}";
sepNavSelRange = "{1501, 0}";
sepNavVisRange = "{0, 1813}";
};
};
F8430BB00C72B16000753941 /* CTMIME_Enumerator.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {726, 1106}}";
sepNavSelRange = "{1723, 33}";
sepNavVisRange = "{0, 2362}";
};
};
F846D211102F7D7500E0277B /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = F81B88540A74AA7100143DF6 /* CTCoreFolder.h */;
name = "CTCoreFolder.h: 15";
rLen = 0;
rLoc = 628;
rType = 0;
vrLen = 965;
vrLoc = 2700;
};
F846D212102F7D7500E0277B /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = F81B88550A74AA7100143DF6 /* CTCoreFolder.m */;
name = "CTCoreFolder.m: 328";
rLen = 0;
rLoc = 9377;
rType = 0;
vrLen = 680;
vrLoc = 1556;
};
F858CC470C51DE6B00EF1B3D /* CTBareMessage.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1019, 672}}";
sepNavSelRange = "{628, 0}";
sepNavVisRange = "{150, 1741}";
};
};
F858CC480C51DE6B00EF1B3D /* CTBareMessage.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1019, 826}}";
sepNavSelRange = "{628, 0}";
sepNavVisRange = "{799, 1298}";
sepNavWindowFrame = "{{84, 413}, {1078, 697}}";
};
};
F88804D50B4243C000D400E7 /* MailCoreUtilities.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {996, 681}}";
sepNavSelRange = "{628, 0}";
sepNavVisRange = "{0, 1963}";
};
};
F88804D60B4243C000D400E7 /* MailCoreUtilities.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {779, 1078}}";
sepNavSelRange = "{2121, 0}";
sepNavVisRange = "{1906, 591}";
};
};
F88CA0CC0BF7A7B00055AC29 /* CTSMTP.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {996, 756}}";
sepNavSelRange = "{628, 0}";
sepNavVisRange = "{0, 2164}";
};
};
F88CA0CD0BF7A7B00055AC29 /* CTSMTP.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {996, 1414}}";
sepNavSelRange = "{628, 0}";
sepNavVisRange = "{0, 2023}";
};
};
F88CA0D20BF7AC0B0055AC29 /* CTESMTP.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {996, 714}}";
sepNavSelRange = "{628, 0}";
sepNavVisRange = "{0, 2028}";
};
};
F88CA0D30BF7AC0B0055AC29 /* CTESMTP.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {996, 2338}}";
sepNavSelRange = "{628, 0}";
sepNavVisRange = "{0, 2020}";
};
};
F8A70EED0C4059E100D1D694 /* JRLog.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {996, 1050}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{0, 1661}";
};
};
F8A70EEE0C4059E100D1D694 /* JRLog.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {779, 3918}}";
sepNavSelRange = "{6285, 92}";
sepNavVisRange = "{5899, 740}";
};
};
F8A70EFF0C4069C300D1D694 /* Source Control */ = {
isa = PBXSourceControlManager;
fallbackIsa = XCSourceControlManager;
isSCMEnabled = 0;
scmConfiguration = {
};
};
F8A70F000C4069C300D1D694 /* Code sense */ = {
isa = PBXCodeSenseManager;
indexTemplatePath = "";
};
F8D31A3109C524EA00468234 /* main.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {958, 2478}}";
sepNavSelRange = "{6343, 0}";
sepNavVisRange = "{0, 2923}";
sepNavWindowFrame = "{{237, 16}, {1100, 785}}";
};
};
F8DCD39F0C13E1BE00B10F94 /* uidplus_types.h */ = {
isa = PBXFileReference;
fileEncoding = 30;
lastKnownFileType = sourcecode.c.h;
name = uidplus_types.h;
path = /Users/mronge/Projects/mailcore/OpenSourceProjects/include/libetpan/uidplus_types.h;
sourceTree = "<absolute>";
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {779, 714}}";
sepNavSelRange = "{124, 0}";
sepNavVisRange = "{0, 540}";
};
};
F8EA76110C1141C1004F85D8 /* CTCoreAddressTests.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {996, 681}}";
sepNavSelRange = "{628, 0}";
sepNavVisRange = "{0, 1699}";
};
};
F8EA76120C1141C1004F85D8 /* CTCoreAddressTests.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {996, 681}}";
sepNavSelRange = "{628, 0}";
sepNavVisRange = "{0, 2227}";
};
};
F8EADFB30B3BB178000C8371 /* CTCoreMessageTests.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1019, 574}}";
sepNavSelRange = "{79, 0}";
sepNavVisRange = "{0, 1749}";
sepNavWindowFrame = "{{38, 455}, {1078, 697}}";
};
};
F8EADFB40B3BB178000C8371 /* CTCoreMessageTests.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1024, 2436}}";
sepNavSelRange = "{8647, 0}";
sepNavVisRange = "{6730, 1361}";
sepNavWindowFrame = "{{15, 476}, {1078, 697}}";
};
};
F8EB05EA102FAC0E0073B4B2 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = F88804D60B4243C000D400E7 /* MailCoreUtilities.m */;
name = "MailCoreUtilities.m: 54";
rLen = 0;
rLoc = 2121;
rType = 0;
vrLen = 591;
vrLoc = 1906;
};
F8EB05EE102FAC0E0073B4B2 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = F88804D60B4243C000D400E7 /* MailCoreUtilities.m */;
name = "MailCoreUtilities.m: 54";
rLen = 0;
rLoc = 2121;
rType = 0;
vrLen = 591;
vrLoc = 1906;
};
F8EB05F8102FAC460073B4B2 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = F81B88540A74AA7100143DF6 /* CTCoreFolder.h */;
name = "CTCoreFolder.h: 84";
rLen = 0;
rLoc = 3233;
rType = 0;
vrLen = 1096;
vrLoc = 2736;
};
F8EB062D102FB4F20073B4B2 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = F81B88550A74AA7100143DF6 /* CTCoreFolder.m */;
name = "CTCoreFolder.m: 240";
rLen = 0;
rLoc = 6960;
rType = 0;
vrLen = 760;
vrLoc = 6755;
};
F8EB0644102FB7670073B4B2 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = F81B88550A74AA7100143DF6 /* CTCoreFolder.m */;
name = "CTCoreFolder.m: 241";
rLen = 0;
rLoc = 6999;
rType = 0;
vrLen = 760;
vrLoc = 6755;
};
F8EB064E1030E0E30073B4B2 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = F81B88550A74AA7100143DF6 /* CTCoreFolder.m */;
name = "CTCoreFolder.m: 241";
rLen = 0;
rLoc = 6999;
rType = 0;
vrLen = 760;
vrLoc = 6755;
};
F8EB065C1030E1760073B4B2 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
comments = "warning: 'NSIntMapKeyCallBacks' is deprecated (declared at /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSMapTable.h:121)";
fRef = F8A70EEE0C4059E100D1D694 /* JRLog.m */;
rLen = 1;
rLoc = 227;
rType = 1;
};
F8EB065D1030E1760073B4B2 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = F8A70EEE0C4059E100D1D694 /* JRLog.m */;
name = "JRLog.m: 228";
rLen = 92;
rLoc = 6285;
rType = 0;
vrLen = 226;
vrLoc = 6157;
};
F8EB065F1030E1770073B4B2 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = F81B88550A74AA7100143DF6 /* CTCoreFolder.m */;
name = "CTCoreFolder.m: 241";
rLen = 0;
rLoc = 6999;
rType = 0;
vrLen = 760;
vrLoc = 6755;
};
F8EB06601030E1770073B4B2 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = F81B88550A74AA7100143DF6 /* CTCoreFolder.m */;
name = "CTCoreFolder.m: 241";
rLen = 0;
rLoc = 6999;
rType = 0;
vrLen = 760;
vrLoc = 6755;
};
F8EB06611030E1770073B4B2 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = F8A70EEE0C4059E100D1D694 /* JRLog.m */;
name = "JRLog.m: 228";
rLen = 92;
rLoc = 6285;
rType = 0;
vrLen = 740;
vrLoc = 5899;
};
F8EB06761030F4960073B4B2 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = F8A70EEE0C4059E100D1D694 /* JRLog.m */;
name = "JRLog.m: 228";
rLen = 92;
rLoc = 6285;
rType = 0;
vrLen = 740;
vrLoc = 5899;
};
F8EB06771030F4960073B4B2 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = F8DCD39F0C13E1BE00B10F94 /* uidplus_types.h */;
name = "uidplus_types.h: 10";
rLen = 0;
rLoc = 124;
rType = 0;
vrLen = 540;
vrLoc = 0;
};
F8EB06781030F4960073B4B2 /* PBXBookmark */ = {
isa = PBXBookmark;
fRef = F80BDF620A774369003B344E /* maildir.h */;
};
F8EB06791030F4960073B4B2 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = F8A70EEE0C4059E100D1D694 /* JRLog.m */;
name = "JRLog.m: 228";
rLen = 92;
rLoc = 6285;
rType = 0;
vrLen = 740;
vrLoc = 5899;
};
F8EB067A1030F4960073B4B2 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = F8DCD39F0C13E1BE00B10F94 /* uidplus_types.h */;
name = "uidplus_types.h: 10";
rLen = 0;
rLoc = 124;
rType = 0;
vrLen = 540;
vrLoc = 0;
};
F8EB067B1030F4960073B4B2 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = F80BDF620A774369003B344E /* maildir.h */;
name = "maildir.h: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 1607;
vrLoc = 0;
};
F8EB06811030F4FA0073B4B2 /* acl_types.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {779, 2114}}";
sepNavSelRange = "{863, 0}";
sepNavVisRange = "{0, 1607}";
};
};
F8EB07931030F5040073B4B2 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = F8A70EEE0C4059E100D1D694 /* JRLog.m */;
name = "JRLog.m: 228";
rLen = 92;
rLoc = 6285;
rType = 0;
vrLen = 740;
vrLoc = 5899;
};
F8EB07941030F5040073B4B2 /* PBXBookmark */ = {
isa = PBXBookmark;
fRef = F8EB06811030F4FA0073B4B2 /* acl_types.h */;
};
F8EB07951030F5040073B4B2 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = F8A70EEE0C4059E100D1D694 /* JRLog.m */;
name = "JRLog.m: 228";
rLen = 92;
rLoc = 6285;
rType = 0;
vrLen = 740;
vrLoc = 5899;
};
F8EB07961030F5040073B4B2 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = F8EB06811030F4FA0073B4B2 /* acl_types.h */;
name = "acl_types.h: 19";
rLen = 0;
rLoc = 863;
rType = 0;
vrLen = 1607;
vrLoc = 0;
};
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:MailCore.xcodeproj">
</FileRef>
</Workspace>
+1 -1
View File
@@ -3,5 +3,5 @@
//
#ifdef __OBJC__
#import <Cocoa/Cocoa.h>
#import <Foundation/Foundation.h>
#endif
Binary file not shown.
+27
View File
@@ -0,0 +1,27 @@
__ __ ______ __ __ ______ ______ ______ ______
/\ "-./ \ /\ __ \ /\ \ /\ \ /\ ___\ /\ __ \ /\ == \ /\ ___\
\ \ \-./\ \ \ \ __ \ \ \ \ \ \ \____ \ \ \____ \ \ \/\ \ \ \ __< \ \ __\
\ \_\ \ \_\ \ \_\ \_\ \ \_\ \ \_____\ \ \_____\ \ \_____\ \ \_\ \_\ \ \_____\
\/_/ \/_/ \/_/\/_/ \/_/ \/_____/ \/_____/ \/_____/ \/_/ /_/ \/_____/
##Getting the code
First checkout the code and pulldown the required dependencies as submodules:
git clone https://github.com/mronge/MailCore.git
cd MailCore/
git submodule update --init
Now open up MailCore.xcodeproj and build either the iOS static library or the Mac OS X framework depending on your needs.
##Website
The official site contains documentation, FAQs, and step by step instructions on how to include MailCore
http://www.libmailcore.com
Thanks,
Matt Ronge
[@mronge](http://www.twitter.com/mronge)
+7
View File
@@ -12,6 +12,13 @@ projects. To run the example projects:
The documentation isn't as detailed as I'd like. Sorry about that! If
something isn't clear try reading the source included or contact me.
IPHONE USE
reMail has ported MailCore over to the iPhone. Check out their open
source project that includes MailCore:
http://code.google.com/p/remail-iphone/
CONTACT INFO
MailCore by Matt Ronge
+568
View File
@@ -0,0 +1,568 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>application/andrew-inset</key>
<array>
<string>ez</string>
</array>
<key>application/java-archive</key>
<array>
<string>jar</string>
</array>
<key>application/mac-binhex40</key>
<array>
<string>hqx</string>
</array>
<key>application/mac-compactpro</key>
<array>
<string>cpt</string>
</array>
<key>application/msword</key>
<array>
<string>doc</string>
</array>
<key>application/octet-stream</key>
<array>
<string>dms</string>
<string>lha</string>
<string>lzh</string>
<string>exe</string>
<string>class</string>
<string>so</string>
<string>dll</string>
<string>iso</string>
<string>fla</string>
</array>
<key>application/oda</key>
<array>
<string>oda</string>
</array>
<key>application/pdf</key>
<array>
<string>pdf</string>
</array>
<key>application/postscript</key>
<array>
<string>eps</string>
<string>ai</string>
<string>ps</string>
</array>
<key>application/smil</key>
<array>
<string>smil</string>
</array>
<key>application/vnd.adobe.xdp+xml</key>
<array>
<string>xdp</string>
</array>
<key>application/vnd.adobe.xfd+xml</key>
<array>
<string>xfd</string>
</array>
<key>application/vnd.adobe.xfdf</key>
<array>
<string>xfdf</string>
</array>
<key>application/vnd.fdf</key>
<array>
<string>fdf</string>
</array>
<key>application/vnd.mif</key>
<array>
<string>mif</string>
</array>
<key>application/vnd.ms-excel</key>
<array>
<string>xls</string>
</array>
<key>application/vnd.ms-powerpoint</key>
<array>
<string>ppt</string>
</array>
<key>application/vnd.wap.wbxml</key>
<array>
<string>wbxml</string>
</array>
<key>application/vnd.wap.wmlc</key>
<array>
<string>wmlc</string>
</array>
<key>application/vnd.wap.wmlscriptc</key>
<array>
<string>wmlsc</string>
</array>
<key>application/x-bcpio</key>
<array>
<string>bcpio</string>
</array>
<key>application/x-cdlink</key>
<array>
<string>vcd</string>
</array>
<key>application/x-chess-pgn</key>
<array>
<string>pgn</string>
</array>
<key>application/x-compress</key>
<array>
<string>Z</string>
</array>
<key>application/x-cpio</key>
<array>
<string>cpio</string>
</array>
<key>application/x-csh</key>
<array>
<string>csh</string>
</array>
<key>application/x-director</key>
<array>
<string>dcr</string>
<string>dir</string>
<string>dxr</string>
</array>
<key>application/x-diskcopy</key>
<array>
<string>smi</string>
<string>dmg</string>
</array>
<key>application/x-dvi</key>
<array>
<string>dvi</string>
</array>
<key>application/x-filemaker</key>
<array>
<string>fp6</string>
<string>fp5</string>
<string>fp4</string>
<string>fp3</string>
<string>fp2</string>
<string>fp</string>
</array>
<key>application/x-futuresplash</key>
<array>
<string>spl</string>
</array>
<key>application/x-gtar</key>
<array>
<string>gtar</string>
</array>
<key>application/x-gzip</key>
<array>
<string>gz</string>
<string>tgz</string>
<string>cpgz</string>
</array>
<key>application/x-hdf</key>
<array>
<string>hdf</string>
</array>
<key>application/x-java-jnlp-file</key>
<array>
<string>jnlp</string>
</array>
<key>application/x-javascript</key>
<array>
<string>js</string>
</array>
<key>application/x-koan</key>
<array>
<string>skp</string>
<string>skd</string>
<string>skt</string>
<string>skm</string>
</array>
<key>application/x-latex</key>
<array>
<string>latex</string>
</array>
<key>application/x-ms-wmd</key>
<array>
<string>wmd</string>
</array>
<key>application/x-netcdf</key>
<array>
<string>nc</string>
<string>cdf</string>
</array>
<key>application/x-photoshop</key>
<array>
<string>psd</string>
</array>
<key>application/x-sh</key>
<array>
<string>sh</string>
</array>
<key>application/x-shar</key>
<array>
<string>shar</string>
</array>
<key>application/x-shockwave-flash</key>
<array>
<string>swf</string>
</array>
<key>application/x-stuffit</key>
<array>
<string>sit</string>
</array>
<key>application/x-sv4cpio</key>
<array>
<string>sv4cpio</string>
</array>
<key>application/x-sv4crc</key>
<array>
<string>sv4crc</string>
</array>
<key>application/x-tar</key>
<array>
<string>tar</string>
</array>
<key>application/x-tcl</key>
<array>
<string>tcl</string>
</array>
<key>application/x-tex</key>
<array>
<string>tex</string>
</array>
<key>application/x-texinfo</key>
<array>
<string>texinfo</string>
<string>texi</string>
</array>
<key>application/x-troff</key>
<array>
<string>t</string>
<string>tr</string>
<string>roff</string>
</array>
<key>application/x-troff-man</key>
<array>
<string>man</string>
</array>
<key>application/x-troff-me</key>
<array>
<string>me</string>
</array>
<key>application/x-troff-ms</key>
<array>
<string>ms</string>
</array>
<key>application/x-ustar</key>
<array>
<string>ustar</string>
</array>
<key>application/x-wais-source</key>
<array>
<string>src</string>
</array>
<key>application/x-webarchive</key>
<array>
<string>webarchive</string>
</array>
<key>application/xhtml+xml</key>
<array>
<string>xhtml</string>
<string>xhtm</string>
</array>
<key>application/xml</key>
<array>
<string>xml</string>
</array>
<key>application/zip</key>
<array>
<string>zip</string>
</array>
<key>audio/basic</key>
<array>
<string>au</string>
<string>snd</string>
</array>
<key>audio/midi</key>
<array>
<string>mid</string>
<string>midi</string>
<string>kar</string>
</array>
<key>audio/mpeg</key>
<array>
<string>mp3</string>
<string>mpga</string>
<string>mp2</string>
</array>
<key>audio/scpls</key>
<array>
<string>pls</string>
</array>
<key>audio/x-aiff</key>
<array>
<string>aif</string>
<string>aiff</string>
<string>aifc</string>
</array>
<key>audio/x-m4p</key>
<array>
<string>m4p</string>
</array>
<key>audio/x-mpegurl</key>
<array>
<string>m3u</string>
</array>
<key>audio/x-ms-wma</key>
<array>
<string>wma</string>
</array>
<key>audio/x-pn-realaudio</key>
<array>
<string>ram</string>
<string>rm</string>
</array>
<key>audio/x-pn-realaudio-plugin</key>
<array>
<string>rpm</string>
</array>
<key>audio/x-realaudio</key>
<array>
<string>ra</string>
</array>
<key>audio/x-wav</key>
<array>
<string>wav</string>
</array>
<key>chemical/x-pdb</key>
<array>
<string>pdb</string>
</array>
<key>chemical/x-xyz</key>
<array>
<string>xyz</string>
</array>
<key>image/bmp</key>
<array>
<string>bmp</string>
</array>
<key>image/gif</key>
<array>
<string>gif</string>
</array>
<key>image/ief</key>
<array>
<string>ief</string>
</array>
<key>image/jp2</key>
<array>
<string>jp2</string>
</array>
<key>image/jpeg</key>
<array>
<string>jpg</string>
<string>jpeg</string>
<string>jpe</string>
</array>
<key>image/pict</key>
<array>
<string>pict</string>
<string>pic</string>
</array>
<key>image/png</key>
<array>
<string>png</string>
</array>
<key>image/quicktime</key>
<array>
<string>qti</string>
<string>qtif</string>
</array>
<key>image/svg+xml</key>
<array>
<string>svg</string>
<string>svgz</string>
</array>
<key>image/tiff</key>
<array>
<string>tiff</string>
<string>tif</string>
</array>
<key>image/vnd.wap.wbmp</key>
<array>
<string>wbmp</string>
</array>
<key>image/x-cmu-raster</key>
<array>
<string>ras</string>
</array>
<key>image/x-icon</key>
<array>
<string>ico</string>
</array>
<key>image/x-macpaint</key>
<array>
<string>pnt</string>
<string>pntg</string>
<string>mac</string>
</array>
<key>image/x-pcx</key>
<array>
<string>pcx</string>
</array>
<key>image/x-portable-anymap</key>
<array>
<string>pnm</string>
</array>
<key>image/x-portable-bitmap</key>
<array>
<string>pbm</string>
</array>
<key>image/x-portable-graymap</key>
<array>
<string>pgm</string>
</array>
<key>image/x-portable-pixmap</key>
<array>
<string>ppm</string>
</array>
<key>image/x-rgb</key>
<array>
<string>rgb</string>
</array>
<key>image/x-targa</key>
<array>
<string>targa</string>
</array>
<key>image/x-xbitmap</key>
<array>
<string>xbm</string>
</array>
<key>image/x-xpixmap</key>
<array>
<string>xpm</string>
</array>
<key>image/x-xwindowdump</key>
<array>
<string>xwd</string>
</array>
<key>model/iges</key>
<array>
<string>igs</string>
<string>iges</string>
</array>
<key>model/mesh</key>
<array>
<string>msh</string>
<string>mesh</string>
<string>silo</string>
</array>
<key>model/vrml</key>
<array>
<string>wrl</string>
<string>vrml</string>
</array>
<key>text/calendar</key>
<array>
<string>ics</string>
</array>
<key>text/css</key>
<array>
<string>css</string>
</array>
<key>text/html</key>
<array>
<string>html</string>
<string>htm</string>
<string>shtml</string>
<string>jhtml</string>
</array>
<key>text/plain</key>
<array>
<string>txt</string>
<string>asc</string>
<string>text</string>
</array>
<key>text/qif</key>
<array>
<string>qif</string>
</array>
<key>text/richtext</key>
<array>
<string>rtx</string>
</array>
<key>text/rtf</key>
<array>
<string>rtf</string>
</array>
<key>text/sgml</key>
<array>
<string>sgml</string>
<string>sgm</string>
</array>
<key>text/tab-separated-values</key>
<array>
<string>tsv</string>
</array>
<key>text/vcard</key>
<array>
<string>vcf</string>
</array>
<key>text/vnd.wap.wml</key>
<array>
<string>wml</string>
</array>
<key>text/vnd.wap.wmlscript</key>
<array>
<string>wmls</string>
</array>
<key>text/x-setext</key>
<array>
<string>etx</string>
</array>
<key>text/xml</key>
<array>
<string>xml</string>
<string>xsl</string>
</array>
<key>video/mpeg</key>
<array>
<string>mpeg</string>
<string>mpg</string>
<string>mpe</string>
</array>
<key>video/quicktime</key>
<array>
<string>qt</string>
<string>mov</string>
</array>
<key>video/vnd.mpegurl</key>
<array>
<string>mxu</string>
</array>
<key>video/x-ms-asf</key>
<array>
<string>asf</string>
</array>
<key>video/x-ms-wmv</key>
<array>
<string>wmv</string>
</array>
<key>video/x-ms-wmx</key>
<array>
<string>wmx</string>
</array>
<key>video/x-ms.wmp</key>
<array>
<string>wmp</string>
</array>
<key>video/x-msvideo</key>
<array>
<string>avi</string>
</array>
<key>video/x-sgi-movie</key>
<array>
<string>movie</string>
</array>
<key>x-conference/x-cooltalk</key>
<array>
<string>ice</string>
</array>
</dict>
</plist>
-30
View File
@@ -1,30 +0,0 @@
import os, fnmatch, glob, projectutils
# Must be run from the root of the MailCore project
if __name__ == "__main__":
os.system('mkdir OpenSourceProjects/build')
# Build universal libetpan
print "Expanding libetpan..."
projectpath = projectutils.expandArchive(os.path.abspath("OpenSourceProjects/"),"libetpan")
os.chdir(projectpath)
print "Building libetpan i386"
os.system('env CPPFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk -arch i386" ./configure --disable-dependency-tracking --host i386')
os.system('make')
os.system('mkdir i386')
os.system('mv src/.libs/*.a i386')
print "Building libetpan PPC"
os.system('make clean')
os.system('env CPPFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc" ./configure --disable-dependency-tracking --host ppc')
os.system('make')
os.system('mkdir ppc')
os.system('mv src/.libs/*.a ppc')
print "Using lipo to create libetpan universal binary"
os.system('lipo i386/libetpan.a ppc/libetpan.a -output ../build/libetpan.a -create')
print "Creating headers"
projectutils.searchAndReplaceInDirectory('include', r'include <libetpan/(.*?)>', r'include "\1"')
os.system('cp -r include ../')
-10
View File
@@ -1,10 +0,0 @@
import os, fnmatch, glob, projectutils
# Must be run from the root of the project
if __name__ == "__main__":
if(os.path.exists("OpenSourceProjects/build") == False):
os.system('python Scripts/BuildScripts/buildlibetpan.py')
-23
View File
@@ -1,23 +0,0 @@
#! /usr/bin/sh
# Run this from the root of the MailCore project
# Pass in as an arg the tag name for the release
mkdir -p build/MailCore
xcodebuild -configuration Release
cp -R build/Release/MailCore.framework build/MailCore
cp -R Documentation/ build/MailCore/Documentation
cd Examples/InboxLister
xcodebuild clean
cd ../MessageSender
xcodebuild clean
cd ../..
cp -R Examples build/MailCore
cp Resources/GETTING_STARTED.txt build/MailCore
cp Resources/LICENSE.txt build/MailCore
cp Resources/RELEASE_NOTES.txt build/MailCore
cd build/MailCore
ln -s Documentation/index.html index.html
hg clone -r $1 https://bitbucket.org/mronge/mailcore/ src
cd ..
tar czf MailCore.tar.gz MailCore
-29
View File
@@ -1,29 +0,0 @@
import os, fnmatch, glob, re
def expandArchive(directory, archiveName):
""" Given a directory, it will try and find an archive that
has name that begins with archiveName and will then expand it """
for path, subdirs, files in os.walk(directory):
for filename in files:
pattern = archiveName+"*.tar.gz"
if(fnmatch.fnmatch(filename,pattern)):
archivePath = os.path.join(path, filename)
os.chdir(directory)
os.system("tar xzf \""+archivePath+"\"");
return os.path.join(path, filename[:-7])
def searchAndReplaceInDirectory(directory, regex, replacement):
""" Given a directory this will go through and do a search and a replace
with the regex and will replace with replacement """
for path, subdirs, files in os.walk(directory):
for name in files:
fullPath = os.path.join(path,name)
thefile = open(fullPath,'r+')
lines = thefile.readlines()
thefile.close()
newfile = open(fullPath, 'w')
newlines = []
for line in lines:
newlines.append(re.sub(regex, replacement, line))
newfile.writelines(newlines)
newfile.close()
-8
View File
@@ -1,8 +0,0 @@
#! /usr/bin/sh
# Run this from the root of the MailCore project
# Arg 1 is the tag name
cp -r Documentation API
scp -r API mronge.com:/var/www/mronge/m/MailCore/API
scp build/MailCore.tar.gz mronge.com:/var/www/mronge/m/MailCore/MailCore-$1.tar.gz
+19 -6
View File
@@ -29,20 +29,33 @@
* SUCH DAMAGE.
*/
#import <Cocoa/Cocoa.h>
#import <Foundation/Foundation.h>
#import "CTMIME_SinglePart.h"
@class CTMIME_SinglePart;
@class CTCoreAttachment;
//TODO Document me
/**
Represents an attachment before it has been fully fetched.
*/
@interface CTBareAttachment : NSObject {
CTMIME_SinglePart *mMIMEPart;
NSString *mFilename;
NSString *mContentType;
CTMIME_SinglePart *mMIMEPart;
NSString *mFilename;
NSString *mContentType;
}
@property(retain) NSString *filename;
@property(retain) NSString *contentType;
@property(readonly) CTMIME_SinglePart *part;
-(NSString*)decodedFilename;
- (id)initWithMIMESinglePart:(CTMIME_SinglePart *)part;
/**
Fetches the full attachment
*/
- (CTCoreAttachment *)fetchFullAttachment;
/**
Fetches the full attachment
Also has a progress handler
*/
- (CTCoreAttachment *)fetchFullAttachmentWithProgress:(CTProgressBlock)block;
@end
+30 -17
View File
@@ -31,6 +31,7 @@
#import "CTBareAttachment.h"
#import "MailCoreUtilities.h"
#import "MailCoreTypes.h"
#import "CTMIME_SinglePart.h"
#import "CTCoreAttachment.h"
@@ -40,31 +41,43 @@
@synthesize filename=mFilename;
- (id)initWithMIMESinglePart:(CTMIME_SinglePart *)part {
self = [super init];
if (self) {
mMIMEPart = [part retain];
self.filename = mMIMEPart.filename;
self.contentType = mMIMEPart.contentType;
}
return self;
self = [super init];
if (self) {
mMIMEPart = [part retain];
self.filename = mMIMEPart.filename;
self.contentType = mMIMEPart.contentType;
}
return self;
}
-(NSString*)decodedFilename {
return MailCoreDecodeMIMEPhrase((char *)[self.filename UTF8String]);
}
- (NSString *)description {
return [NSString stringWithFormat:@"ContentType: %@\tFilename: %@",
self.contentType, self.filename];
return [NSString stringWithFormat:@"ContentType: %@\tFilename: %@",
self.contentType, self.filename];
}
- (CTCoreAttachment *)fetchFullAttachment {
[mMIMEPart fetchPart];
CTCoreAttachment *attach = [[CTCoreAttachment alloc] initWithData:mMIMEPart.data
contentType:self.contentType filename:self.filename];
return [attach autorelease];
return [self fetchFullAttachmentWithProgress:^(size_t curr, size_t max) {}];
}
- (CTCoreAttachment *)fetchFullAttachmentWithProgress:(CTProgressBlock)block {
[mMIMEPart fetchPartWithProgress:block];
CTCoreAttachment *attach = [[CTCoreAttachment alloc] initWithData:mMIMEPart.data
contentType:self.contentType filename:self.filename];
return [attach autorelease];
}
- (CTMIME_SinglePart *)part {
return mMIMEPart;
}
- (void)dealloc {
[mMIMEPart release];
[mFilename release];
[mContentType release];
[super dealloc];
[mMIMEPart release];
[mFilename release];
[mContentType release];
[super dealloc];
}
@end
+56 -40
View File
@@ -29,69 +29,85 @@
* SUCH DAMAGE.
*/
#import <Cocoa/Cocoa.h>
#import "libetpan.h"
#import <Foundation/Foundation.h>
#import <libetpan/libetpan.h>
#import "MailCoreTypes.h"
/*!
@class CTCoreAccount
CTCoreAccount is the base class with which you establish a connection to the
IMAP server. After establishing a connection with CTCoreAccount you can access
all of the folders (I use the term folder instead of mailbox) on the server.
All methods throw an exception on failure.
/**
CTCoreAccount is the base class with which you establish a connection to the
IMAP server. After establishing a connection with CTCoreAccount you can access
all of the folders (I use the term folder instead of mailbox) on the server.
*/
@class CTCoreFolder;
@interface CTCoreAccount : NSObject {
struct mailstorage *myStorage;
BOOL connected;
@interface CTCoreAccount : NSObject {
struct mailstorage *myStorage;
BOOL connected;
NSError *lastError;
NSString *pathDelimiter;
}
/**
If an error occurred (nil or return of NO) call this method to get the error
*/
@property(nonatomic, retain) NSError *lastError;
/*!
@abstract Retrieves the list of all the available folders from the server.
@result Returns a NSSet which contains NSStrings of the folders pathnames.
@property(nonatomic, retain) NSString *pathDelimiter;
/**
Retrieves the list of all the available folders from the server.
@return Returns a NSSet which contains NSStrings of the folders pathnames, nil on error
*/
- (NSSet *)allFolders;
/*!
@abstract Retrieves a list of only the subscribed folders from the server.
@result Returns a NSSet which contains NSStrings of the folders pathnames.
/**
Retrieves the list of all the available folders from the server using the extended list command (XLIST).
This is only supported by Gmail.
@return Returns a NSSet which contains CTXlistResults, nil on error
*/
- (NSSet *)allFoldersExtended;
/**
Retrieves a list of only the subscribed folders from the server.
@return Returns a NSSet which contains NSStrings of the folders pathnames, nil on error
*/
- (NSSet *)subscribedFolders;
/*!
@abstract If you have the path of a folder on the server use this method to retrieve just the one folder.
@param path A NSString specifying the path of the folder to retrieve from the server.
@result Returns a CTCoreFolder.
/**
If you have the path of a folder on the server use this method to retrieve just the one folder.
@param path A NSString specifying the path of the folder to retrieve from the server.
@return Returns a CTCoreFolder.
*/
- (CTCoreFolder *)folderWithPath:(NSString *)path;
/*!
@abstract This method initiates the connection to the server.
@param server The address of the server.
@param port The port to connect to.
@param connnectionType What kind of connection to use, it can be one of these three values:
CONNECTION_TYPE_PLAIN, CONNECTION_TYPE_STARTTLS, CONNECTION_TYPE_TRY_STARTTLS, CONNECTION_TYPE_TLS
@param authType The authentication type, only IMAP_AUTH_TYPE_PLAIN is currently supported
@param login The username to connect with.
@param password The password to use to connect.
/**
This method initiates the connection to the server.
@param server The address of the server.
@param port The port to connect to.
@param connnectionType What kind of connection to use, it can be one of these three values:
CTConnectionTypePlain, CTConnectionTypeStartTLS, CTConnectionTypeTryStartTLS, CTConnectionTypeTLS. See MailCoreTypes.h for more information
@param authType The authentication type, only CTImapAuthTypePlain is currently supported
@param login The username to connect with.
@param password The password to use to connect.
@return Return YES on success, NO on error. Call method lastError to get error if one occurred
*/
- (void)connectToServer:(NSString *)server port:(int)port connectionType:(int)conType authType:(int)authType
login:(NSString *)login password:(NSString *)password;
/*!
@abstract This method returns the current connection status.
@result Returns YES or NO as the status of the connection.
- (BOOL)connectToServer:(NSString *)server port:(int)port connectionType:(int)conType authType:(int)authType
login:(NSString *)login password:(NSString *)password;
/**
This method returns the current connection status.
@return Returns YES or NO as the status of the connection.
*/
- (BOOL)isConnected;
/*!
@abstract Terminates the connection. If you terminate this connection it will also affect the
connectivity of CTCoreFolders and CTMessages that rely on this account.
/**
Terminates the connection. If you terminate this connection it will also affect the
connectivity of CTCoreFolders and CTMessages that rely on this account.
*/
- (void)disconnect;
- (NSSet *)capabilities;
/* Intended for advanced use only */
- (mailimap *)session;
- (struct mailstorage *)storageStruct;
+254 -138
View File
@@ -31,186 +31,302 @@
#import "CTCoreAccount.h"
#import "CTCoreFolder.h"
#import "CTXlistResult.h"
#import "MailCoreTypes.h"
#import "MailCoreUtilities.h"
@interface CTCoreAccount (Private)
@interface CTCoreAccount ()
@end
@implementation CTCoreAccount
@synthesize lastError, pathDelimiter;
- (id)init {
self = [super init];
if (self) {
connected = NO;
myStorage = mailstorage_new(NULL);
assert(myStorage != NULL);
}
return self;
self = [super init];
if (self) {
connected = NO;
myStorage = mailstorage_new(NULL);
assert(myStorage != NULL);
}
return self;
}
- (void)dealloc {
mailstorage_disconnect(myStorage);
mailstorage_free(myStorage);
[super dealloc];
mailstorage_disconnect(myStorage);
mailstorage_free(myStorage);
self.lastError = nil;
self.pathDelimiter = nil;
[super dealloc];
}
- (NSError *)lastError {
return lastError;
}
- (BOOL)isConnected {
return connected;
return connected;
}
- (BOOL)connectToServer:(NSString *)server port:(int)port
connectionType:(int)conType authType:(int)authType
login:(NSString *)login password:(NSString *)password {
int err = 0;
int imap_cached = 0;
//TODO, should I use the cache?
- (void)connectToServer:(NSString *)server port:(int)port
connectionType:(int)conType authType:(int)authType
login:(NSString *)login password:(NSString *)password {
int err = 0;
int imap_cached = 0;
const char* auth_type_to_pass = NULL;
if(authType == IMAP_AUTH_TYPE_SASL_CRAM_MD5) {
auth_type_to_pass = "CRAM-MD5";
}
err = imap_mailstorage_init(myStorage,
(char *)[server cStringUsingEncoding:NSASCIIStringEncoding],
(uint16_t)port, NULL, conType, authType,
(char *)[login cStringUsingEncoding:NSASCIIStringEncoding],
(char *)[password cStringUsingEncoding:NSASCIIStringEncoding],
imap_cached, NULL);
if (err != MAIL_NO_ERROR) {
NSException *exception = [NSException
exceptionWithName:CTMemoryError
reason:CTMemoryErrorDesc
userInfo:nil];
[exception raise];
}
err = mailstorage_connect(myStorage);
if (err == MAIL_ERROR_LOGIN) {
NSException *exception = [NSException
exceptionWithName:CTLoginError
reason:CTLoginErrorDesc
userInfo:nil];
[exception raise];
}
else if (err != MAIL_NO_ERROR) {
NSException *exception = [NSException
exceptionWithName:CTUnknownError
reason:[NSString stringWithFormat:@"Error number: %d",err]
userInfo:nil];
[exception raise];
}
else
connected = YES;
err = imap_mailstorage_init_sasl(myStorage,
(char *)[server cStringUsingEncoding:NSUTF8StringEncoding],
(uint16_t)port, NULL,
conType,
auth_type_to_pass,
NULL,
NULL, NULL,
(char *)[login cStringUsingEncoding:NSUTF8StringEncoding], (char *)[login cStringUsingEncoding:NSUTF8StringEncoding],
(char *)[password cStringUsingEncoding:NSUTF8StringEncoding], NULL,
imap_cached, NULL);
if (err != MAILIMAP_NO_ERROR) {
self.lastError = MailCoreCreateErrorFromIMAPCode(err);
return NO;
}
err = mailstorage_connect(myStorage);
if (err == MAIL_ERROR_LOGIN) {
self.lastError = MailCoreCreateError(err, @"Invalid username or password");
return NO;
} else if (err != MAILIMAP_NO_ERROR) {
self.lastError = MailCoreCreateErrorFromIMAPCode(err);
return NO;
}
connected = YES;
return YES;
}
- (NSSet *)capabilities {
NSMutableSet *capabilitiesSet = [NSMutableSet set];
int r;
struct mailimap_capability_data *capabilities;
r = mailimap_capability(self.session, &capabilities);
if (r != MAILIMAP_NO_ERROR) {
self.lastError = MailCoreCreateErrorFromIMAPCode(r);
return nil;
}
for(clistiter * cur = clist_begin(capabilities->cap_list); cur != NULL ; cur = cur->next) {
struct mailimap_capability *capability;
NSString *name;
capability = clist_content(cur);
name = nil;
switch (capability->cap_type) {
case MAILIMAP_CAPABILITY_AUTH_TYPE:
name = [@"AUTH=" stringByAppendingString:[NSString stringWithUTF8String:capability->cap_data.cap_auth_type]];
break;
case MAILIMAP_CAPABILITY_NAME:
name = [NSString stringWithUTF8String:capability->cap_data.cap_name];
break;
}
if (name != nil) {
[capabilitiesSet addObject:name];
}
}
mailimap_capability_data_free(capabilities);
return capabilitiesSet;
}
- (void)disconnect {
connected = NO;
mailstorage_disconnect(myStorage);
if (connected) {
connected = NO;
mailstorage_disconnect(myStorage);
}
}
- (CTCoreFolder *)folderWithPath:(NSString *)path {
CTCoreFolder *folder = [[CTCoreFolder alloc] initWithPath:path inAccount:self];
return [folder autorelease];
CTCoreFolder *folder = [[CTCoreFolder alloc] initWithPath:path inAccount:self];
return [folder autorelease];
}
- (mailimap *)session {
struct imap_cached_session_state_data * cached_data;
struct imap_session_state_data * data;
mailsession *session;
session = myStorage->sto_session;
if (strcasecmp(session->sess_driver->sess_name, "imap-cached") == 0)
{
cached_data = session->sess_data;
session = cached_data->imap_ancestor;
}
struct imap_cached_session_state_data * cached_data;
struct imap_session_state_data * data;
mailsession *session;
data = session->sess_data;
return data->imap_session;
session = myStorage->sto_session;
if(session == nil) {
return nil;
}
if (strcasecmp(session->sess_driver->sess_name, "imap-cached") == 0) {
cached_data = session->sess_data;
session = cached_data->imap_ancestor;
}
data = session->sess_data;
return data->imap_session;
}
- (struct mailstorage *)storageStruct {
return myStorage;
return myStorage;
}
- (NSSet *)subscribedFolders {
struct mailimap_mailbox_list * mailboxStruct;
clist *subscribedList;
clistiter *cur;
NSString *mailboxNameObject;
char *mailboxName;
int err;
NSMutableSet *subscribedFolders = [NSMutableSet set];
//Fill the subscribed folder array
err = mailimap_lsub([self session], "", "*", &subscribedList);
if (err != MAIL_NO_ERROR) {
NSException *exception = [NSException
exceptionWithName:CTUnknownError
reason:[NSString stringWithFormat:@"Error number: %d",err]
userInfo:nil];
[exception raise];
}
else if (clist_isempty(subscribedList)) {
NSException *exception = [NSException
exceptionWithName:CTNoSubscribedFolders
reason:CTNoSubscribedFoldersDesc
userInfo:nil];
[exception raise];
}
for(cur = clist_begin(subscribedList); cur != NULL; cur = cur->next) {
mailboxStruct = cur->data;
mailboxName = mailboxStruct->mb_name;
mailboxNameObject = [NSString stringWithCString:mailboxName encoding:NSASCIIStringEncoding];
[subscribedFolders addObject:mailboxNameObject];
}
mailimap_list_result_free(subscribedList);
return subscribedFolders;
struct mailimap_mailbox_list * mailboxStruct;
clist *subscribedList;
clistiter *cur;
NSString *mailboxNameObject;
char *mailboxName;
int err;
NSMutableSet *subscribedFolders = [NSMutableSet set];
//Fill the subscribed folder array
err = mailimap_lsub([self session], "", "*", &subscribedList);
if (err != MAILIMAP_NO_ERROR) {
self.lastError = MailCoreCreateErrorFromIMAPCode(err);
return nil;
}
for(cur = clist_begin(subscribedList); cur != NULL; cur = cur->next) {
mailboxStruct = cur->data;
struct mailimap_mbx_list_flags *flags = mailboxStruct->mb_flag;
BOOL selectable = YES;
if (flags) {
selectable = !(flags->mbf_type==MAILIMAP_MBX_LIST_FLAGS_SFLAG && flags->mbf_sflag==MAILIMAP_MBX_LIST_SFLAG_NOSELECT);
}
if (selectable) {
mailboxName = mailboxStruct->mb_name;
// Per RFC 3501, mailbox names must use 7-bit enconding (UTF-7).
mailboxNameObject = (NSString *)CFStringCreateWithCString(NULL, mailboxName, kCFStringEncodingUTF7_IMAP);
if (mailboxStruct->mb_delimiter) {
self.pathDelimiter = [NSString stringWithFormat:@"%c", mailboxStruct->mb_delimiter];
} else {
self.pathDelimiter = @"/";
}
[subscribedFolders addObject:mailboxNameObject];
[mailboxNameObject release];
}
}
mailimap_list_result_free(subscribedList);
return subscribedFolders;
}
- (NSSet *)allFolders {
struct mailimap_mailbox_list * mailboxStruct;
clist *allList;
clistiter *cur;
NSString *mailboxNameObject;
char *mailboxName;
int err;
NSMutableSet *allFolders = [NSMutableSet set];
struct mailimap_mailbox_list * mailboxStruct;
clist *allList;
clistiter *cur;
//Now, fill the all folders array
//TODO Fix this so it doesn't use *
err = mailimap_list([self session], "", "*", &allList);
if (err != MAIL_NO_ERROR)
{
NSException *exception = [NSException
exceptionWithName:CTUnknownError
reason:[NSString stringWithFormat:@"Error number: %d",err]
userInfo:nil];
[exception raise];
}
else if (clist_isempty(allList))
{
NSException *exception = [NSException
exceptionWithName:CTNoFolders
reason:CTNoFoldersDesc
userInfo:nil];
[exception raise];
}
for(cur = clist_begin(allList); cur != NULL; cur = cur->next)
{
mailboxStruct = cur->data;
mailboxName = mailboxStruct->mb_name;
mailboxNameObject = [NSString stringWithCString:mailboxName encoding:NSASCIIStringEncoding];
[allFolders addObject:mailboxNameObject];
}
mailimap_list_result_free(allList);
return allFolders;
NSString *mailboxNameObject;
char *mailboxName;
int err;
NSMutableSet *allFolders = [NSMutableSet set];
//Now, fill the all folders array
//TODO Fix this so it doesn't use *
err = mailimap_list([self session], "", "*", &allList);
if (err != MAILIMAP_NO_ERROR) {
self.lastError = MailCoreCreateErrorFromIMAPCode(err);
return nil;
}
for(cur = clist_begin(allList); cur != NULL; cur = cur->next)
{
mailboxStruct = cur->data;
struct mailimap_mbx_list_flags *flags = mailboxStruct->mb_flag;
BOOL selectable = YES;
if (flags) {
selectable = !(flags->mbf_type==MAILIMAP_MBX_LIST_FLAGS_SFLAG && flags->mbf_sflag==MAILIMAP_MBX_LIST_SFLAG_NOSELECT);
}
if (selectable) {
mailboxName = mailboxStruct->mb_name;
// Per RFC 3501, mailbox names must use 7-bit enconding (UTF-7).
mailboxNameObject = (NSString *)CFStringCreateWithCString(NULL, mailboxName, kCFStringEncodingUTF7_IMAP);
if (mailboxStruct->mb_delimiter) {
self.pathDelimiter = [NSString stringWithFormat:@"%c", mailboxStruct->mb_delimiter];
} else {
self.pathDelimiter = @"/";
}
[allFolders addObject:mailboxNameObject];
[mailboxNameObject release];
}
}
mailimap_list_result_free(allList);
return allFolders;
}
- (NSSet *)allFoldersExtended {
struct mailimap_mailbox_list * mailboxStruct;
struct mailimap_mbx_list_oflag * oflagStruct;
clist *allList;
clistiter *cur, *flagIter;
NSString *mailboxNameObject;
char *mailboxName;
NSString *flagNameObject;
char *flagName;
int err;
NSMutableSet *allFolders = [NSMutableSet set];
CTXlistResult *listResult;
//Now, fill the all folders array
//TODO Fix this so it doesn't use *
err = mailimap_xlist([self session], "", "*", &allList);
if (err != MAILIMAP_NO_ERROR) {
self.lastError = MailCoreCreateErrorFromIMAPCode(err);
return nil;
}
for(cur = clist_begin(allList); cur != NULL; cur = cur->next)
{
mailboxStruct = cur->data;
struct mailimap_mbx_list_flags *flags = mailboxStruct->mb_flag;
BOOL selectable = YES;
if (flags) {
selectable = !(flags->mbf_type==MAILIMAP_MBX_LIST_FLAGS_SFLAG && flags->mbf_sflag==MAILIMAP_MBX_LIST_SFLAG_NOSELECT);
}
if (selectable) {
mailboxName = mailboxStruct->mb_name;
// Per RFC 3501, mailbox names must use 7-bit enconding (UTF-7).
mailboxNameObject = (NSString *)CFStringCreateWithCString(NULL, mailboxName, kCFStringEncodingUTF7_IMAP);
if (mailboxStruct->mb_delimiter) {
self.pathDelimiter = [NSString stringWithFormat:@"%c", mailboxStruct->mb_delimiter];
} else {
self.pathDelimiter = @"/";
}
listResult = [[CTXlistResult alloc] init];
[listResult setName:mailboxNameObject];
[mailboxNameObject release];
if (flags) {
for (flagIter = clist_begin(flags->mbf_oflags); flagIter != NULL; flagIter = flagIter->next) {
oflagStruct = flagIter->data;
flagName = oflagStruct->of_flag_ext;
flagNameObject = (NSString *)CFStringCreateWithCString(NULL, flagName, kCFStringEncodingUTF7_IMAP);
[listResult addFlag:flagNameObject];
[flagNameObject release];
}
}
[allFolders addObject:listResult];
[listResult release];
}
}
mailimap_list_result_free(allList);
return allFolders;
}
@end
+26 -26
View File
@@ -29,61 +29,61 @@
* SUCH DAMAGE.
*/
#import <Cocoa/Cocoa.h>
#import <Foundation/Foundation.h>
/*!
@class @CTCoreAddress
This is a very simple class designed to make it easier to work with email addresses since many times
the e-mail address and name are both encoded in the MIME e-mail fields. This class should be very straight
forward, you can get and set a name and an e-mail address.
/**
This is a very simple class designed to make it easier to work with email addresses since many times
the e-mail address and name are both encoded in the MIME e-mail fields. This class should be very straight
forward, you can get and set a name and an e-mail address.
*/
@interface CTCoreAddress : NSObject {
NSString *email;
NSString *name;
NSString *email;
NSString *name;
}
/*!
@abstract Returns a CTCoreAddress with the name and e-mail address set as an empty string.
/**
Returns a CTCoreAddress with the name and e-mail address set as an empty string.
*/
+ (id)address;
/*!
@abstract Returns a CTCoreAddress set with the specified name and email.
/**
Returns a CTCoreAddress set with the specified name and email.
*/
+ (id)addressWithName:(NSString *)aName email:(NSString *)aEmail;
/*!
@abstract Returns a CTCoreAddress set with the specified name and email.
/**
Returns a CTCoreAddress set with the specified name and email.
*/
- (id)initWithName:(NSString *)aName email:(NSString *)aEmail;
/*!
@abstract Returns the name as a NSString
/**
Returns the name as a NSString
*/
- (NSString *)name;
-(NSString*)decodedName; // added by Gabor
/*!
@abstract Sets the name.
/**
Sets the name.
*/
- (void)setName:(NSString *)aValue;
/*!
@abstract Returns the e-mail as a NSString
/**
Returns the e-mail as a NSString
*/
- (NSString *)email;
/*!
@abstract Sets the e-mail.
/**
Sets the e-mail.
*/
- (void)setEmail:(NSString *)aValue;
/*!
@abstract Works like the typical isEqual: method
/**
Works like the typical isEqual: method
*/
- (BOOL)isEqual:(id)object;
/*!
@abstract Standard description method
/**
Standard description method
*/
- (NSString *)description;
@end
+36 -31
View File
@@ -31,78 +31,83 @@
#import "CTCoreAddress.h"
#import "MailCoreUtilities.h"
@implementation CTCoreAddress
+ (id)address {
CTCoreAddress *aAddress = [[CTCoreAddress alloc] init];
return [aAddress autorelease];
CTCoreAddress *aAddress = [[CTCoreAddress alloc] init];
return [aAddress autorelease];
}
+ (id)addressWithName:(NSString *)aName email:(NSString *)aEmail {
CTCoreAddress *aAddress = [[CTCoreAddress alloc] initWithName:aName email:aEmail];
return [aAddress autorelease];
CTCoreAddress *aAddress = [[CTCoreAddress alloc] initWithName:aName email:aEmail];
return [aAddress autorelease];
}
- (id)initWithName:(NSString *)aName email:(NSString *)aEmail {
self = [super init];
if (self) {
[self setName:aName];
[self setEmail:aEmail];
}
return self;
self = [super init];
if (self) {
[self setName:aName];
[self setEmail:aEmail];
}
return self;
}
- (id)init {
self = [super init];
if (self) {
[self setName:@""];
[self setEmail:@""];
}
return self;
self = [super init];
if (self) {
[self setName:@""];
[self setEmail:@""];
}
return self;
}
-(NSString*)decodedName {
return MailCoreDecodeMIMEPhrase((char *)[self.name UTF8String]);
}
- (NSString *)name {
return name;
return name;
}
- (void)setName:(NSString *)aValue {
NSString *oldName = name;
name = [aValue retain];
[oldName release];
NSString *oldName = name;
name = [aValue retain];
[oldName release];
}
- (NSString *)email {
return email;
return email;
}
- (void)setEmail:(NSString *)aValue {
NSString *oldEmail = email;
email = [aValue retain];
[oldEmail release];
NSString *oldEmail = email;
email = [aValue retain];
[oldEmail release];
}
- (NSString *)description {
return [NSString stringWithFormat:@"<%@,%@>", [self name],[self email]];
return [NSString stringWithFormat:@"<%@,%@>", [self name],[self email]];
}
- (BOOL)isEqual:(id)object {
if (![object isKindOfClass:[CTCoreAddress class]])
return NO;
return [[object name] isEqualToString:[self name]] && [[object email] isEqualToString:[self email]];
if (![object isKindOfClass:[CTCoreAddress class]])
return NO;
return [[object name] isEqualToString:[self name]] && [[object email] isEqualToString:[self email]];
}
- (void)dealloc {
[email release];
[name release];
[super dealloc];
[email release];
[name release];
[super dealloc];
}
@end
+22 -4
View File
@@ -29,16 +29,34 @@
* SUCH DAMAGE.
*/
#import <Cocoa/Cocoa.h>
#import <Foundation/Foundation.h>
#import "CTBareAttachment.h"
/**
A message's attachment
*/
@interface CTCoreAttachment : CTBareAttachment {
NSData *mData;
NSData *mData;
}
@property(retain) NSData *data;
/**
Load the attachment from a local file
NOTE: This currently only works on Mac OS X, use initWithData:contentType:filename: instead on iOS
*/
- (id)initWithContentsOfFile:(NSString *)path;
- (id)initWithData:(NSData *)data contentType:(NSString *)contentType
filename:(NSString *)filename;
/**
Create an attachment from a chunk of data
@param data The actual attachment data
@param contentType The MIME content type you'd like to use
@param filename The filename you'd like the attachment to be given in the e-mail message
*/
- (id)initWithData:(NSData *)data contentType:(NSString *)contentType filename:(NSString *)filename;
/**
Used to save the attachment locally
*/
- (BOOL)writeToFile:(NSString *)path;
@end
+36 -35
View File
@@ -37,49 +37,50 @@
@synthesize data=mData;
- (id)initWithContentsOfFile:(NSString *)path {
NSData *data = [NSData dataWithContentsOfFile:path];
NSString *filePathExt = [path pathExtension];
NSString *contentType = nil;
NSDictionary *contentTypes = [NSDictionary dictionaryWithContentsOfFile:CTContentTypesPath];
for (NSString *key in [contentTypes allKeys]) {
NSArray *fileExtensions = [contentTypes objectForKey:key];
for (NSString *ext in fileExtensions) {
if ([filePathExt isEqual:ext]) {
contentType = key;
break;
}
}
if (contentType != nil)
break;
}
// We couldn't find a content-type, set it to something generic
if (contentType == nil) {
contentType = @"application/octet-stream";
}
NSString *filename = [path lastPathComponent];
return [self initWithData:data contentType:contentType filename:filename];
NSData *data = [NSData dataWithContentsOfFile:path];
NSString *filePathExt = [path pathExtension];
NSString *contentType = nil;
NSString *typesPath = [[NSBundle mainBundle] pathForResource:@"types" ofType:@"plist"];
NSDictionary *contentTypes = [NSDictionary dictionaryWithContentsOfFile:typesPath];
for (NSString *key in [contentTypes allKeys]) {
NSArray *fileExtensions = [contentTypes objectForKey:key];
for (NSString *ext in fileExtensions) {
if ([filePathExt isEqual:ext]) {
contentType = key;
break;
}
}
if (contentType != nil)
break;
}
// We couldn't find a content-type, set it to something generic
if (contentType == nil) {
contentType = @"application/octet-stream";
}
NSString *filename = [path lastPathComponent];
return [self initWithData:data contentType:contentType filename:filename];
}
- (id)initWithData:(NSData *)data contentType:(NSString *)contentType
filename:(NSString *)filename {
self = [super init];
if (self) {
self.data = data;
self.contentType = contentType;
self.filename = filename;
}
return self;
filename:(NSString *)filename {
self = [super init];
if (self) {
self.data = data;
self.contentType = contentType;
self.filename = filename;
}
return self;
}
- (BOOL)writeToFile:(NSString *)path {
return [mData writeToFile:path atomically:YES];
return [mData writeToFile:path atomically:YES];
}
- (void)dealloc {
[mData release];
[super dealloc];
[mData release];
[super dealloc];
}
@end
+178 -110
View File
@@ -29,169 +29,237 @@
* SUCH DAMAGE.
*/
#import <Cocoa/Cocoa.h>
#import "libetpan.h"
#import <Foundation/Foundation.h>
#import <libetpan/libetpan.h>
#import "MailCoreTypes.h"
/*!
@class CTCoreFolder
CTCoreFolder is the class used to get and set attributes for a server side folder. It is also the
class used to get a list of messages from the server. You need to make sure and establish a connection
first by calling connect. All methods throw an exceptions on failure.
/**
CTCoreFolder is the class used to get and set attributes for a server side folder. It is also the
class used to get a list of messages from the server. You need to make sure and establish a connection
first by calling connect.
*/
@class CTCoreMessage, CTCoreAccount;
@interface CTCoreFolder : NSObject {
struct mailfolder *myFolder;
CTCoreAccount *myAccount;
NSString *myPath;
BOOL connected;
struct mailfolder *myFolder;
CTCoreAccount *myAccount;
NSString *myPath;
BOOL connected;
NSError *lastError;
BOOL idling;
int idlePipe[2];
}
/**
If an error occurred (nil or return of NO) call this method to get the error
*/
@property (nonatomic, retain) NSError *lastError;
/*!
@abstract This method is used to initialize a folder. This method or the
method in CTCoreAccount folderWithPath can be used to setup a folder.
@param inAccount This parameter must be passed in so the folder can initiate it's connection.
@property (nonatomic, retain) CTCoreAccount *parentAccount;
/**
This method is used to initialize a folder. This method or the
method in CTCoreAccount folderWithPath can be used to setup a folder.
@param inAccount This parameter must be passed in so the folder can initiate it's connection.
*/
- (id)initWithPath:(NSString *)path inAccount:(CTCoreAccount *)account;
/*!
@abstract This initiates the connection after the folder has been initalized.
/**
This initiates the connection after the folder has been initalized.
@return Return YES on success, NO on error. Call method lastError to get error if one occurred
*/
- (void)connect;
- (BOOL)connect;
/*!
@abstract This method terminates the connection, make sure you don't have any message
connections open from this folder before disconnecting.
/**
This method terminates the connection
Make sure you don't have any message connections open from this folder before disconnecting.
*/
- (void)disconnect;
/*
Implementation is in alpha.
/**
This will return the message from this folder with the UID that was passed in.
A CTMessage object is returned which can be used to get further information and perform operationson the message.
@return A CTCoreMessage or if not found, nil
*/
//TODO Document Me!
- (NSSet *)messageObjectsFromIndex:(unsigned int)start toIndex:(unsigned int)end;
- (CTCoreMessage *)messageWithUID:(NSUInteger)uid;
/*!
@abstract This will return the message from this folder with the UID that was passed in. If the message
can't be found, nil is returned
@param uid The uid as an NSString for the message to retrieve.
@result A CTMessage object is returned which can be used to get further information and perform operations
on the message.
/**
Use this method to download message lists from the server.
This method take fetch attributes which configure what is fetched. Fetch attributes can be combined
so you fetch all the message data at once, or select which pieces you want for your app. You can
also fetch just the default attributes which will be as fast as possible. Pass in
CTFetchAttrDefaultsOnly to attrs fetch the minimum possible, this includes the UID, RFC822.size, and
flags. The defaults are always fetched, even when you don't pass in this flag. Use
CTFetchAttrBodyStructure to also fetch the body structure of the message. This prevents a future
round trip done by [CTCoreMessage fetchBodyStructure], if it sees you already have the body
structure it won't re-fetch it. Use CTFetchAttrEnvelope if you'd like to fetch the subject, to,
from, cc, bcc, sender, date etc. You can also fetch both the envelope and body structure by passing
in CTFetchAttrEnvelope | CTFetchAttrBodyStructure
@param start The message sequence number to start from, starts with 1 and NOT 0 (IMAP starts with 1 that way, sorry)
@param end The ending message sequence number, or if you'd like to fetch to the end of the message list pass in 0
@param attrs This controls what is fetched.
@return Returns a NSArray of CTCoreMessage's. Returns nil on error
*/
- (CTCoreMessage *)messageWithUID:(NSString *)uid;
- (NSArray *)messagesFromSequenceNumber:(NSUInteger)startNum to:(NSUInteger)endNum withFetchAttributes:(CTFetchAttributes)attrs;
/**
Use this method to download message lists from the server.
This method uses UID ranges to determine which messages to download, while messagesFromSequenceNumber:to:withFetchAttributes: uses sequence numbers.
//TODO Document me!
//TODO Attributes is ignore, fix me!
- (NSSet *)messageListWithFetchAttributes:(NSArray *)attributes;
/*!
@abstract This validates the passed in UID. The server can at times change the set of UID's for a folder. So
you should verify that the server is still using the same set when connecting.
@param uid The UID to verify.
@return YES if the UID is valid.
@param start The message sequence number to start from, starts with 1 and NOT 0 (IMAP starts with 1 that way, sorry)
@param end The ending message sequence number, or if you'd like to fetch to the end of the message list pass in 0
@param attrs This controls what is fetched.
@return Returns a NSArray of CTCoreMessage's. Returns nil on error
@see messagesFromSequenceNumber:to:withFetchAttributes:
*/
- (BOOL)isUIDValid:(NSString *)uid;
- (NSArray *)messagesFromUID:(NSUInteger)startUID to:(NSUInteger)endUID withFetchAttributes:(CTFetchAttributes)attrs;
/*!
@abstract Pulls the sequence number for the messag with the specified uid.
It does not perform UID validation, and the sequence ID is only
valid per session.
@param The uid for the message
@return > 1 if successful, 0 on err
/**
Pulls the sequence number for the message with the specified uid.
It does not perform UID validation, and the sequence ID is only
valid per session.
@param The uid for the message
@return Return YES on success, NO on error. Call method lastError to get error if one occurred
*/
- (NSUInteger)sequenceNumberForUID:(NSString *)uid;
- (BOOL)sequenceNumberForUID:(NSUInteger)uid sequenceNumber:(NSUInteger *)sequenceNumber;
//FIXME What is this?
- (void)check;
/**
Perform an IMAP check command
From IMAP RFC: "The CHECK command requests a checkpoint of the currently selected mailbox.
A checkpoint refers to any implementation-dependent housekeeping associated
with the mailbox (e.g., resolving the server's in-memory state of the mailbox
with the state on its disk) that is not normally executed as part of each command."
@return Return YES on success, NO on error. Call method lastError to get error if one occurred
*/
- (BOOL)check;
/*!
@abstract The folder name.
*/
- (NSString *)name;
/*!
@abstract The entire path of folder.
/**
The entire path of the folder.
*/
- (NSString *)path;
/*!
@abstract This will change the path of the folder. Use this method to rename the folder on the server
or to move the folder on the server.
@param path The new path for the folder as an NSString.
/**
This will change the path of the folder.
Use this method to rename the folder on the server or to move the folder on the server.
@param path The new path for the folder as an NSString.
@return Return YES on success, NO on error. Call method lastError to get error if one occurred
*/
- (void)setPath:(NSString *)path;
- (BOOL)setPath:(NSString *)path;
/*!
@abstract If the folder doesn't exist on the server this method will create it. Make sure the pathname
has been set first.
/**
Sends the idle command to the server.
*/
- (CTIdleResult)idleWithTimeout:(NSUInteger)timeout;
- (void)cancelIdle;
@property (atomic) BOOL idling;
/**
If the folder doesn't exist on the server this method will create it. Make sure the pathname
has been set first.
@return Return YES on success, NO on error. Call method lastError to get error if one occurred
*/
- (void)create;
- (BOOL)create;
/*!
@abstract This method will remove the folder and any messages contained within from the server.
Be careful when using this method because there is no way to undo.
/**
This method will remove the folder and any messages contained within from the server.
Be careful when using this method because there is no way to undo.
@return Return YES on success, NO on error. Call method lastError to get error if one occurred
*/
- (void)delete;
- (BOOL)delete;
/*!
@abstract The folder will be listed as subscribed on the server.
/**
The folder will be listed as subscribed on the server.
@return Return YES on success, NO on error. Call method lastError to get error if one occurred
*/
- (void)subscribe;
- (BOOL)subscribe;
/*!
@abstract The folder will be listed as unsubscribed.
/**
The folder will be listed as unsubscribed.
@return Return YES on success, NO on error. Call method lastError to get error if one occurred
*/
- (void)unsubscribe;
- (BOOL)unsubscribe;
/*!
@abstract Returns the message flags. You must AND/OR using the defines constants.
Here is a list of message flags:
CTFlagNew, CTFlagSeen, CTFlagFlagged, CTFlagDeleted,
CTFlagAnswered, CTFlagForwarded.
/**
Exposes the IMAP APPEND command, see the IMAP RFC 4549.
@return Return YES on success, NO on error. Call method lastError to get error if one occurred
*/
- (unsigned int)flagsForMessage:(CTCoreMessage *)msg;
- (BOOL) appendMessage: (CTCoreMessage *) msg;
/*!
@abstract Sets the message's flags on the server, take a look at the
documentation for flagsForMessage:
/**
Retrieves the message flags. You must AND/OR using the defines constants.
Here is a list of message flags:
CTFlagNew, CTFlagSeen, CTFlagFlagged, CTFlagDeleted,
CTFlagAnswered, CTFlagForwarded.
@return Return YES on success, NO on error. Call method lastError to get error if one occurred
*/
- (void)setFlags:(unsigned int)flags forMessage:(CTCoreMessage *)msg;
- (BOOL)flagsForMessage:(CTCoreMessage *)msg flags:(NSUInteger *)flags;
/*!
@astract Deletes all messages contained in the folder that are marked for
deletion. Deleting messages in IMAP is a little strange, first
you need to set the message flag CTFlagDeleted to CTFlagSet, and
then when you call expunge on the folder the message is contained
in, it will be deleted.
/**
Sets the message's flags on the server, take a look at the
documentation for flagsForMessage:
@return Return YES on success, NO on error. Call method lastError to get error if one occurred
*/
- (void)expunge;
- (BOOL)setFlags:(NSUInteger)flags forMessage:(CTCoreMessage *)msg;
//TODO document me
//Should this be by message instead of by UID?
- (void)copyMessageWithUID:(NSString *)uid toFolderWithPath:(NSString *)path;
/*!
@abstract Returns the number of unread messages.
@result A NSUInteger containing the number of unread messages.
/**
Deletes all messages contained in the folder that are marked for
deletion. Deleting messages in IMAP is a little strange, first
you need to set the message flag CTFlagDeleted to CTFlagSet, and
then when you call expunge on the folder the message is contained
in, it will be deleted.
@return Return YES on success, NO on error. Call method lastError to get error if one occurred
*/
- (NSUInteger)unreadMessageCount;
- (BOOL)expunge;
/*!
@abstract Returns the number of messages in the folder.
@result A NSUInteger containing the number of messages.
/**
Copies a message to a folder
@return Return YES on success, NO on error. Call method lastError to get error if one occurred
*/
- (NSUInteger)totalMessageCount;
- (BOOL)copyMessageWithUID:(NSUInteger)uid toPath:(NSString *)path;
/*!
@abstract Returns the uid validity value for the folder
@result An integer containing the uid validity
/**
Moves a message to a folder
@return Return YES on success, NO on error. Call method lastError to get error if one occurred
*/
- (BOOL)moveMessageWithUID:(NSUInteger)uid toPath:(NSString *)path;
/**
Returns the number of unread messages. This causes a round trip to the server, as it fetches
the count for each call.
@return Return YES on success, NO on error. Call method lastError to get error if one occurred
*/
- (BOOL)unreadMessageCount:(NSUInteger *)unseenCount;
/**
Returns the number of messages in the folder. The count was retrieved when the folder connection was
established, so to refresh the count you must disconnect and reconnect.
@return Return YES on success, NO on error. Call method lastError to get error if one occurred
*/
- (BOOL)totalMessageCount:(NSUInteger *)totalCount;
/**
Returns the uid validity value for the folder, which can be used to determine if the
local cached UID's are still valid, or if the server has changed UID's
*/
- (NSUInteger)uidValidity;
/**
Returns the uid next value for the folder. The next message added to the mailbox
will be assigned a UID greater than or equal to uidNext
*/
- (NSUInteger)uidNext;
/* Intended for advanced use only */
- (struct mailfolder *)folderStruct;
- (mailsession *)folderSession;
+758 -503
View File
File diff suppressed because it is too large Load Diff
+220 -92
View File
@@ -29,190 +29,318 @@
* SUCH DAMAGE.
*/
#import <Cocoa/Cocoa.h>
#import "libetpan.h"
#import <Foundation/Foundation.h>
#import <libetpan/libetpan.h>
/*!
@class CTCoreMessage
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.
/**
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
convenience method messageWithUID: to get a message object you can work with.
Anything that begins with "fetch", requires that an active network connection is present.
*/
@class CTCoreFolder, CTCoreAddress, CTCoreAttachment, CTMIME;
@interface CTCoreMessage : NSObject {
struct mailmessage *myMessage;
struct mailimf_single_fields *myFields;
CTMIME *myParsedMIME;
NSUInteger mySequenceNumber;
struct mailmessage *myMessage;
struct mailimf_single_fields *myFields;
CTMIME *myParsedMIME;
NSUInteger mySequenceNumber;
NSError *lastError;
CTCoreFolder *parentFolder;
}
/**
If an error occurred (nil or return of NO) call this method to get the error
*/
@property (nonatomic, retain) NSError *lastError;
@property (nonatomic, retain) CTCoreFolder *parentFolder;
/**
If the body structure has been fetched, this will contain the MIME structure
*/
@property(retain) CTMIME *mime;
//TODO Parse this stuff: message_id, inReplyTo, references, comments, keywords, headers
/*!
@abstract Used to instantiate an empty message object.
/**
Used to instantiate an empty message object.
*/
- (id)init;
/*!
@abstract 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.
/**
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)initWithMessageStruct:(struct mailmessage *)message;
/*!
@abstract 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.
/**
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)initWithFileAtPath:(NSString *)path;
/*!
@abstract Used to instantiate a message object based off a string
that contains a valid MIME message
/**
Used to instantiate a message object based off a string
that contains a valid MIME message
*/
- (id)initWithString:(NSString *)msgData;
/*
@abstract Creates an empty message
/**
If a method returns nil or in the case of a BOOL returns NO, call this to get the error that occured
*/
- (id)init;
- (NSError *)lastError;
/*!
@abstract 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.
/**
If the messages body structure hasn't been downloaded already it will be fetched from the server.
The body structure is needed to get attachments or the message body
@return Return YES on success, NO on error. Call method lastError to get error if one occurred
*/
- (void)fetchBody;
- (BOOL)fetchBodyStructure;
/*!
@abstract This method returns the parsed message body as an NSString.
/**
This method returns the parsed plain text message body as an NSString.
If a plaintext body isn't found an empty string is returned
*/
- (NSString *)body;
/*!
@abstract This method sets the message body. Plaintext only please!
/**
This method returns the html body as an NSString.
*/
- (NSString *)htmlBody;
/**
Returns a message body as an NSString.
@param isHTML Pass in a BOOL pointer that will be set to YES if an HTML body is loaded
First attempts to retrieve a plain text body, if that fails then
tries for an HTML body.
*/
- (NSString *)bodyPreferringPlainText:(BOOL *)isHTML;
/**
This method sets the message body. Plaintext only please!
*/
- (void)setBody:(NSString *)body;
/**
Use this method to set the body if you have HTML content.
*/
- (void)setHTMLBody:(NSString *)body;
/**
A list of attachments this message has
*/
- (NSArray *)attachments;
/**
Add an attachment to the message.
Only used when sending e-mail
*/
- (void)addAttachment:(CTCoreAttachment *)attachment;
/*!
@abstract Returns the subject of the message.
/**
Returns the subject of the message.
*/
- (NSString *)subject;
/*!
@abstract Will set the subject of the message, use this when composing e-mail.
/**
Will set the subject of the message, use this when composing e-mail.
*/
- (void)setSubject:(NSString *)subject;
/*!
@abstract Return the date the message was sent. If a date wasn't included then
a date from the distant past is used instead.
/**
Returns the timezone of the sender of the message (got from the Date field timezone attribute)
*/
- (NSCalendarDate *)sentDate;
- (NSTimeZone*)senderTimeZone;
/*!
@abstract Returns YES if the method is unread.
/**
Returns the date as given in the Date mail field (no timezone is applied)
*/
- (NSDate *)senderDate;
/**
Returns the date in the Date field converted to GMT
*/
- (NSDate *)sentDateGMT;
/**
Returns the date in the Date field converted to the local timezone
The local timezone is the one set in the device running this code
*/
- (NSDate *)sentDateLocalTimeZone;
/**
Returns YES if the message is unread.
*/
- (BOOL)isUnread;
/**
Returns YES if the message is recent and unread.
*/
- (BOOL)isNew;
/*!
@abstract A machine readable ID that is guaranteed unique by the
host that generated the messaeg
/**
Returns YES if the message is starred (flagged in IMAP terms).
*/
- (BOOL)isStarred;
/**
A machine readable ID that is guaranteed unique by the
host that generated the message
*/
- (NSString *)messageId;
/*!
@abstract Returns an NSString containing the messages UID.
/**
Returns an NSUInteger containing the messages UID. This number is unique across sessions
*/
- (NSString *)uid;
- (NSUInteger)uid;
/*!
@abstract Returns the message sequence number, this number cannot be used across sessions
/**
Returns the message sequence number, this number cannot be used across sessions
*/
- (NSUInteger)sequenceNumber;
/*!
@abstract 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.
/**
Returns the message size in bytes
*/
- (NSUInteger)messageSize;
/**
Returns the message flags.
The flags contain if there user has replied, forwarded, read, delete etc.
See MailCoreTypes.h for a list of constants
*/
- (NSUInteger)flags;
/**
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)setSequenceNumber:(NSUInteger)sequenceNumber;
/*!
@abstract Parses the from list, the result is an NSSet containing CTCoreAddress's
/**
Parses the from list, the result is an NSSet containing CTCoreAddress's
*/
- (NSSet *)from;
/*!
@abstract Sets the message's from addresses
@param addresses A NSSet containing CTCoreAddress's
/**
Sets the message's from addresses
@param addresses A NSSet containing CTCoreAddress's
*/
- (void)setFrom:(NSSet *)addresses;
/*!
@abstract 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.
/**
Returns the sender.
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.
*/
- (CTCoreAddress *)sender;
/*!
@abstract Returns the list of people the message was sent to, returns an NSSet containing CTAddress's.
/**
Returns the list of people the message was sent to, returns an NSSet containing CTAddress's.
*/
- (NSSet *)to;
/*!
@abstract Sets the message's to addresses
@param addresses A NSSet containing CTCoreAddress's
/**
Sets the message's to addresses
@param addresses A NSSet containing CTCoreAddress's
*/
- (void)setTo:(NSSet *)addresses;
/*!
@abstract Returns the list of people the message was cced to, returns an NSSet containing CTAddress's.
/**
Return the list of messageIds from the in-reply-to field
*/
- (NSArray *)inReplyTo;
/**
Sets the message's in-reply-to messageIds
@param messageIds A NSArray containing NSString messageId's
*/
- (void)setInReplyTo:(NSArray *)messageIds;
/**
Return the list of messageIds from the references field
*/
- (NSArray *)references;
/**
Sets the message's references
@param messageIds A NSArray containing NSString messageId's
*/
- (void)setReferences:(NSArray *)messageIds;
/**
Returns the list of people the message was cced to, returns an NSSet containing CTAddress's.
*/
- (NSSet *)cc;
/*!
@abstract Sets the message's cc addresses
@param addresses A NSSet containing CTCoreAddress's
/**
Sets the message's cc addresses
@param addresses A NSSet containing CTCoreAddress's
*/
- (void)setCc:(NSSet *)addresses;
/*!
@abstract Returns the list of people the message was bcced to, returns an NSSet containing CTAddress's.
/**
Returns the list of people the message was bcced to, returns an NSSet containing CTAddress's.
*/
- (NSSet *)bcc;
/*!
@abstract Sets the message's bcc addresses
@param addresses A NSSet containing CTCoreAddress's
/**
Sets the message's bcc addresses
@param addresses A NSSet containing CTCoreAddress's
*/
- (void)setBcc:(NSSet *)addresses;
/*!
@abstract Returns the list of people the message was in reply-to, returns an NSSet containing CTAddress's.
/**
Returns the list of people the message was in reply-to, returns an NSSet containing CTAddress's.
*/
- (NSSet *)replyTo;
/*!
@abstract Sets the message's reply to addresses
@param addresses A NSSet containing CTCoreAddress's
/**
Sets the message's reply to addresses
@param addresses A NSSet containing CTCoreAddress's
*/
- (void)setReplyTo:(NSSet *)addresses;
/*!
@abstract Returns the message rendered as the appropriate MIME and IMF content. Use this only if you
want the raw encoding of the message.
/**
Returns the message rendered as the appropriate MIME and IMF content.
Use this only if you want the raw encoding of the message.
*/
- (NSString *)render;
/**
Returns the message in the format Mail.app uses, Emlx.
This format stores the message headers, body, and flags.
*/
- (NSData *)messageAsEmlx;
/**
Fetches from the server the rfc822 content of the message, which are the headers and the message body.
@return Return nil on error. Call method lastError to get error if one occurred
*/
- (NSString *)rfc822;
/**
Fetches from the server the rfc822 content of the message headers.
@return Return nil on error. Call method lastError to get error if one occurred
*/
- (NSString *)rfc822Header;
/* Intended for advanced use only */
- (struct mailmessage *)messageStruct;
- (mailimap *)imapSession;
- (void)setBodyStructure:(struct mailmime *)mime;
- (void)setFields:(struct mailimf_fields *)fields;
@end
+643 -324
View File
File diff suppressed because it is too large Load Diff
+9 -10
View File
@@ -29,22 +29,21 @@
* SUCH DAMAGE.
*/
#import <Cocoa/Cocoa.h>
#import <Foundation/Foundation.h>
#import "CTSMTP.h"
/*!
@class CTESMTP
This class is used internally by CTSMTPConnection for ESMTP connections, clients
should not use this directly.
/*
This class is used internally by CTSMTPConnection for ESMTP connections, clients
should not use this directly.
*/
@interface CTESMTP : CTSMTP {
}
- (bool)helo;
- (void)startTLS;
- (void)authenticateWithUsername:(NSString *)username password:(NSString *)password server:(NSString *)server;
- (void)setFrom:(NSString *)fromAddress;
- (void)setRecipientAddress:(NSString *)recAddress;
- (BOOL)helo;
- (BOOL)startTLS;
- (BOOL)authenticateWithUsername:(NSString *)username password:(NSString *)password server:(NSString *)server;
- (BOOL)setFrom:(NSString *)fromAddress;
- (BOOL)setRecipientAddress:(NSString *)recAddress;
@end
+82 -72
View File
@@ -34,6 +34,7 @@
#import "CTCoreAddress.h"
#import "CTCoreMessage.h"
#import "MailCoreTypes.h"
#import "MailCoreUtilities.h"
#include <sys/types.h>
#include <sys/socket.h>
@@ -48,22 +49,22 @@ static int fill_remote_ip_port(mailstream * stream, char * remote_ip_port, size_
socklen_t namelen;
char remote_ip_port_buf[128];
int r;
low = mailstream_get_low(stream);
fd = mailstream_low_get_fd(low);
namelen = sizeof(name);
r = getpeername(fd, (struct sockaddr *) &name, &namelen);
if (r < 0)
return -1;
if (inet_ntop(AF_INET, &name.sin_addr, remote_ip_port_buf,
sizeof(remote_ip_port_buf)))
return -1;
snprintf(remote_ip_port, remote_ip_port_len, "%s;%i",
remote_ip_port_buf, ntohs(name.sin_port));
return 0;
}
@@ -75,101 +76,110 @@ static int fill_local_ip_port(mailstream * stream, char * local_ip_port, size_t
socklen_t namelen;
char local_ip_port_buf[128];
int r;
low = mailstream_get_low(stream);
fd = mailstream_low_get_fd(low);
namelen = sizeof(name);
r = getpeername(fd, (struct sockaddr *) &name, &namelen);
if (r < 0)
return -1;
if (inet_ntop(AF_INET, &name.sin_addr, local_ip_port_buf, sizeof(local_ip_port_buf)))
return -1;
snprintf(local_ip_port, local_ip_port_len, "%s;%i", local_ip_port_buf, ntohs(name.sin_port));
return 0;
}
@implementation CTESMTP
- (bool)helo {
int ret = mailesmtp_ehlo([self resource]);
/* Return false if the server doesn't implement ehlo */
return (ret != MAILSMTP_ERROR_NOT_IMPLEMENTED);
- (BOOL)helo {
int ret = mailesmtp_ehlo([self resource]);
/* Return false if the server doesn't implement ehlo */
return (ret != MAILSMTP_ERROR_NOT_IMPLEMENTED);
}
- (void)startTLS {
mailstream_low * low;
int fd;
mailstream_low * new_low;
int ret = mailesmtp_starttls([self resource]);
IfTrue_RaiseException(ret != MAILSMTP_NO_ERROR, CTSMTPTLS, CTSMTPTLSDesc);
- (BOOL)startTLS {
int ret = mailsmtp_socket_starttls([self resource]);
if (ret != MAIL_NO_ERROR) {
self.lastError = MailCoreCreateErrorFromSMTPCode(ret);
return NO;
}
low = mailstream_get_low([self resource]->stream);
fd = mailstream_low_get_fd(low);
new_low = mailstream_low_tls_open(fd);
mailstream_low_free(low);
mailstream_set_low([self resource]->stream, new_low);
ret = mailesmtp_ehlo([self resource]);
IfTrue_RaiseException(ret != MAILSMTP_NO_ERROR, CTSMTPHello, CTSMTPHelloDesc);
ret = mailesmtp_ehlo([self resource]);
if (ret != MAIL_NO_ERROR) {
self.lastError = MailCoreCreateErrorFromSMTPCode(ret);
return NO;
}
return YES;
}
- (void)authenticateWithUsername:(NSString *)username password:(NSString *)password server:(NSString *)server {
char *cUsername = (char *)[username cStringUsingEncoding:NSASCIIStringEncoding];
char *cPassword = (char *)[password cStringUsingEncoding:NSASCIIStringEncoding];
char *cServer = (char *)[server cStringUsingEncoding:NSASCIIStringEncoding];
char local_ip_port_buf[128];
char remote_ip_port_buf[128];
char * local_ip_port;
char * remote_ip_port;
if (cPassword == NULL)
cPassword = "";
if (cUsername == NULL)
cUsername = "";
int ret = fill_local_ip_port([self resource]->stream, local_ip_port_buf, sizeof(local_ip_port_buf));
if (ret < 0)
local_ip_port = NULL;
else
local_ip_port = local_ip_port_buf;
- (BOOL)authenticateWithUsername:(NSString *)username password:(NSString *)password server:(NSString *)server {
char *cUsername = (char *)[username cStringUsingEncoding:NSUTF8StringEncoding];
char *cPassword = (char *)[password cStringUsingEncoding:NSUTF8StringEncoding];
char *cServer = (char *)[server cStringUsingEncoding:NSUTF8StringEncoding];
ret = fill_remote_ip_port([self resource]->stream, remote_ip_port_buf, sizeof(remote_ip_port_buf));
if (ret < 0)
remote_ip_port = NULL;
else
remote_ip_port = remote_ip_port_buf;
/*
in most case, login = auth_name = user@domain
and realm = server hostname full qualified domain name
char local_ip_port_buf[128];
char remote_ip_port_buf[128];
char * local_ip_port;
char * remote_ip_port;
int mailesmtp_auth_sasl(mailsmtp * session, const char * auth_type,
const char * server_fqdn,
const char * local_ip_port,
const char * remote_ip_port,
const char * login, const char * auth_name,
const char * password, const char * realm);
if (cPassword == NULL)
cPassword = "";
if (cUsername == NULL)
cUsername = "";
*/
ret = mailesmtp_auth_sasl([self resource], "PLAIN", cServer, local_ip_port, remote_ip_port,
cUsername, cUsername, cPassword, cServer);
IfTrue_RaiseException(ret != MAILSMTP_NO_ERROR, CTSMTPLogin, CTSMTPLoginDesc);
int ret = fill_local_ip_port([self resource]->stream, local_ip_port_buf, sizeof(local_ip_port_buf));
if (ret < 0)
local_ip_port = NULL;
else
local_ip_port = local_ip_port_buf;
ret = fill_remote_ip_port([self resource]->stream, remote_ip_port_buf, sizeof(remote_ip_port_buf));
if (ret < 0)
remote_ip_port = NULL;
else
remote_ip_port = remote_ip_port_buf;
char *authType = "PLAIN";
mailsmtp *session = [self resource];
if (session->auth & MAILSMTP_AUTH_CHECKED) {
// If the server doesn't support PLAIN but does support the older LOGIN,
// fall back to LOGIN. This can happen with older servers like Exchange 2003
if (!(session->auth & MAILSMTP_AUTH_PLAIN) && session->auth & MAILSMTP_AUTH_LOGIN) {
authType = "LOGIN";
}
}
ret = mailesmtp_auth_sasl(session, authType, cServer, local_ip_port, remote_ip_port,
cUsername, cUsername, cPassword, cServer);
if (ret != MAIL_NO_ERROR) {
self.lastError = MailCoreCreateErrorFromSMTPCode(ret);
return NO;
}
return YES;
}
- (void)setFrom:(NSString *)fromAddress {
int ret = mailesmtp_mail([self resource], [fromAddress cStringUsingEncoding:NSASCIIStringEncoding], 1, "MailCoreSMTP");
IfTrue_RaiseException(ret != MAILSMTP_NO_ERROR, CTSMTPFrom, CTSMTPFromDesc);
- (BOOL)setFrom:(NSString *)fromAddress {
int ret = mailesmtp_mail([self resource], [fromAddress cStringUsingEncoding:NSUTF8StringEncoding], 1, "MailCoreSMTP");
if (ret != MAIL_NO_ERROR) {
self.lastError = MailCoreCreateErrorFromSMTPCode(ret);
return NO;
}
return YES;
}
- (void)setRecipientAddress:(NSString *)recAddress {
int ret = mailesmtp_rcpt([self resource], [recAddress cStringUsingEncoding:NSASCIIStringEncoding],
MAILSMTP_DSN_NOTIFY_FAILURE|MAILSMTP_DSN_NOTIFY_DELAY,NULL);
IfTrue_RaiseException(ret != MAILSMTP_NO_ERROR, CTSMTPRecipients, CTSMTPRecipientsDesc);
- (BOOL)setRecipientAddress:(NSString *)recAddress {
int ret = mailesmtp_rcpt([self resource], [recAddress cStringUsingEncoding:NSUTF8StringEncoding],
MAILSMTP_DSN_NOTIFY_FAILURE|MAILSMTP_DSN_NOTIFY_DELAY,NULL);
if (ret != MAIL_NO_ERROR) {
self.lastError = MailCoreCreateErrorFromSMTPCode(ret);
return NO;
}
return YES;
}
@end
+6 -6
View File
@@ -29,19 +29,19 @@
* SUCH DAMAGE.
*/
#import <Cocoa/Cocoa.h>
#import "libetpan.h"
#import <Foundation/Foundation.h>
#import <libetpan/libetpan.h>
@class CTMIME_Enumerator;
@interface CTMIME : NSObject {
NSString *mContentType;
NSString *mContentType;
}
@property(retain) NSString *contentType;
@property(readonly) id content;
@property(nonatomic, retain) NSString *contentType;
@property(nonatomic, readonly) id content;
- (id)initWithMIMEStruct:(struct mailmime *)mime
forMessage:(struct mailmessage *)message;
forMessage:(struct mailmessage *)message;
- (struct mailmime *)buildMIMEStruct;
- (NSString *)render;
- (CTMIME_Enumerator *)mimeEnumerator;
+71 -69
View File
@@ -37,92 +37,94 @@
@synthesize contentType=mContentType;
- (id)initWithMIMEStruct:(struct mailmime *)mime
forMessage:(struct mailmessage *)message {
self = [super init];
if (self) {
// We couldn't find a content-type, set it to something generic
NSString *mainType = @"application";
NSString *subType = @"octet-stream";
if (mime != NULL && mime->mm_content_type != NULL) {
struct mailmime_content *content = mime->mm_content_type;
if (content->ct_type != NULL) {
subType = [NSString stringWithCString:content->ct_subtype
encoding:NSASCIIStringEncoding];
subType = [subType lowercaseString];
struct mailmime_type *type = content->ct_type;
if (type->tp_type == MAILMIME_TYPE_DISCRETE_TYPE &&
type->tp_data.tp_discrete_type != NULL) {
switch (type->tp_data.tp_discrete_type->dt_type) {
case MAILMIME_DISCRETE_TYPE_TEXT:
mainType = @"text";
break;
case MAILMIME_DISCRETE_TYPE_IMAGE:
mainType = @"image";
break;
case MAILMIME_DISCRETE_TYPE_AUDIO:
mainType = @"audio";
break;
case MAILMIME_DISCRETE_TYPE_VIDEO:
mainType = @"video";
break;
case MAILMIME_DISCRETE_TYPE_APPLICATION:
mainType = @"application";
break;
}
}
else if (type->tp_type == MAILMIME_TYPE_COMPOSITE_TYPE &&
type->tp_data.tp_composite_type != NULL) {
switch (type->tp_data.tp_discrete_type->dt_type) {
case MAILMIME_COMPOSITE_TYPE_MESSAGE:
mainType = @"message";
break;
case MAILMIME_COMPOSITE_TYPE_MULTIPART:
mainType = @"multipart";
break;
}
}
}
}
mContentType = [[NSString alloc] initWithFormat:@"%@/%@", mainType, subType];
}
return self;
forMessage:(struct mailmessage *)message {
self = [super init];
if (self) {
// We couldn't find a content-type, set it to something generic
NSString *mainType = @"application";
NSString *subType = @"octet-stream";
if (mime != NULL && mime->mm_content_type != NULL) {
struct mailmime_content *content = mime->mm_content_type;
if (content->ct_type != NULL) {
subType = [NSString stringWithCString:content->ct_subtype
encoding:NSUTF8StringEncoding];
subType = [subType lowercaseString];
struct mailmime_type *type = content->ct_type;
if (type->tp_type == MAILMIME_TYPE_DISCRETE_TYPE &&
type->tp_data.tp_discrete_type != NULL) {
switch (type->tp_data.tp_discrete_type->dt_type) {
case MAILMIME_DISCRETE_TYPE_TEXT:
mainType = @"text";
break;
case MAILMIME_DISCRETE_TYPE_IMAGE:
mainType = @"image";
break;
case MAILMIME_DISCRETE_TYPE_AUDIO:
mainType = @"audio";
break;
case MAILMIME_DISCRETE_TYPE_VIDEO:
mainType = @"video";
break;
case MAILMIME_DISCRETE_TYPE_APPLICATION:
mainType = @"application";
break;
}
}
else if (type->tp_type == MAILMIME_TYPE_COMPOSITE_TYPE &&
type->tp_data.tp_composite_type != NULL) {
switch (type->tp_data.tp_discrete_type->dt_type) {
case MAILMIME_COMPOSITE_TYPE_MESSAGE:
mainType = @"message";
break;
case MAILMIME_COMPOSITE_TYPE_MULTIPART:
mainType = @"multipart";
break;
}
}
}
}
mContentType = [[NSString alloc] initWithFormat:@"%@/%@", mainType, subType];
}
return self;
}
- (id)content {
return nil;
return nil;
}
- (NSString *)contentType {
return mContentType;
return mContentType;
}
- (struct mailmime *)buildMIMEStruct {
return NULL;
return NULL;
}
- (NSString *)render {
MMAPString * str = mmap_string_new("");
int col = 0;
int err = 0;
NSString *resultStr;
mailmime_write_mem(str, &col, [self buildMIMEStruct]);
err = mmap_string_ref(str);
assert(err == 0);
resultStr = [[NSString alloc] initWithBytes:str->str length:str->len
encoding:NSASCIIStringEncoding];
mmap_string_free(str);
return [resultStr autorelease];
MMAPString * str = mmap_string_new("");
int col = 0;
int err = 0;
NSString *resultStr;
struct mailmime *mime = [self buildMIMEStruct];
mailmime_write_mem(str, &col, mime);
err = mmap_string_ref(str);
resultStr = [[NSString alloc] initWithBytes:str->str length:str->len
encoding:NSUTF8StringEncoding];
mmap_string_free(str);
mime->mm_data.mm_message.mm_fields = NULL;
mailmime_free(mime);
return [resultStr autorelease];
}
- (CTMIME_Enumerator *)mimeEnumerator {
CTMIME_Enumerator *enumerator;
enumerator = [[CTMIME_Enumerator alloc] initWithMIME:self];
return [enumerator autorelease];
CTMIME_Enumerator *enumerator;
enumerator = [[CTMIME_Enumerator alloc] initWithMIME:self];
return [enumerator autorelease];
}
- (void)dealloc {
[mContentType release];
[super dealloc];
[mContentType release];
[super dealloc];
}
@end
+5 -3
View File
@@ -29,7 +29,9 @@
* SUCH DAMAGE.
*/
#import <Cocoa/Cocoa.h>
#import <Foundation/Foundation.h>
#import <libetpan/libetpan.h>
@class CTMIME, CTMIME_SinglePart;
@@ -37,7 +39,7 @@
}
+ (CTMIME *)createMIMEWithMIMEStruct:(struct mailmime *)mime
forMessage:(struct mailmessage *)message;
forMessage:(struct mailmessage *)message;
+ (CTMIME_SinglePart *)createMIMESinglePartWithMIMEStruct:(struct mailmime *)mime
forMessage:(struct mailmessage *)message;
forMessage:(struct mailmessage *)message;
@end
+39 -39
View File
@@ -32,7 +32,7 @@
#import "CTMIMEFactory.h"
#import "MailCoreTypes.h"
#import "libetpan.h"
#import "MailCoreUtilities.h"
#import "CTMIME_SinglePart.h"
#import "CTMIME_MessagePart.h"
#import "CTMIME_MultiPart.h"
@@ -42,46 +42,46 @@
@implementation CTMIMEFactory
+ (CTMIME *)createMIMEWithMIMEStruct:(struct mailmime *)mime
forMessage:(struct mailmessage *)message {
if (mime == NULL) {
RaiseException(CTMIMEParseError, CTMIMEParseErrorDesc);
}
switch (mime->mm_type) {
case MAILMIME_SINGLE:
return [CTMIMEFactory createMIMESinglePartWithMIMEStruct:mime
forMessage:message];
break;
case MAILMIME_MULTIPLE:
return [[[CTMIME_MultiPart alloc] initWithMIMEStruct:mime
forMessage:message] autorelease];
break;
case MAILMIME_MESSAGE:
return [[[CTMIME_MessagePart alloc] initWithMIMEStruct:mime
forMessage:message] autorelease];
break;
}
return NULL;
forMessage:(struct mailmessage *)message {
if (mime == nil) {
return nil;
}
switch (mime->mm_type) {
case MAILMIME_SINGLE:
return [CTMIMEFactory createMIMESinglePartWithMIMEStruct:mime
forMessage:message];
break;
case MAILMIME_MULTIPLE:
return [[[CTMIME_MultiPart alloc] initWithMIMEStruct:mime
forMessage:message] autorelease];
break;
case MAILMIME_MESSAGE:
return [[[CTMIME_MessagePart alloc] initWithMIMEStruct:mime
forMessage:message] autorelease];
break;
}
return NULL;
}
+ (CTMIME_SinglePart *)createMIMESinglePartWithMIMEStruct:(struct mailmime *)mime
forMessage:(struct mailmessage *)message {
struct mailmime_type *aType = mime->mm_content_type->ct_type;
if (aType->tp_type != MAILMIME_TYPE_DISCRETE_TYPE) {
/* What do you do with a composite single part? */
return nil;
}
CTMIME_SinglePart *content = nil;
switch (aType->tp_data.tp_discrete_type->dt_type) {
case MAILMIME_DISCRETE_TYPE_TEXT:
content = [[CTMIME_TextPart alloc] initWithMIMEStruct:mime
forMessage:message];
break;
default:
content = [[CTMIME_SinglePart alloc] initWithMIMEStruct:mime
forMessage:message];
break;
}
return [content autorelease];
forMessage:(struct mailmessage *)message {
struct mailmime_type *aType = mime->mm_content_type->ct_type;
if (aType->tp_type != MAILMIME_TYPE_DISCRETE_TYPE) {
/* What do you do with a composite single part? */
return nil;
}
CTMIME_SinglePart *content = nil;
switch (aType->tp_data.tp_discrete_type->dt_type) {
case MAILMIME_DISCRETE_TYPE_TEXT:
content = [[CTMIME_TextPart alloc] initWithMIMEStruct:mime
forMessage:message];
break;
default:
content = [[CTMIME_SinglePart alloc] initWithMIMEStruct:mime
forMessage:message];
break;
}
return [content autorelease];
}
@end
+2 -2
View File
@@ -29,14 +29,14 @@
* SUCH DAMAGE.
*/
#import <Cocoa/Cocoa.h>
#import <Foundation/Foundation.h>
@class CTMIME;
//TODO Document me
// Breadth first
@interface CTMIME_Enumerator : NSEnumerator {
NSMutableArray *mToVisit;
NSMutableArray *mToVisit;
}
- (id)initWithMIME:(CTMIME *)mime;
+35 -35
View File
@@ -28,7 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#import "CTMIME_Enumerator.h"
#import "CTMIME.h"
@@ -37,48 +37,48 @@
@implementation CTMIME_Enumerator
- (id)initWithMIME:(CTMIME *)mime {
self = [super init];
if (self) {
mToVisit = [[NSMutableArray alloc] init];
[mToVisit addObject:mime];
}
return self;
self = [super init];
if (self) {
mToVisit = [[NSMutableArray alloc] init];
[mToVisit addObject:mime];
}
return self;
}
- (NSArray *)allObjects {
NSMutableArray *objects = [NSMutableArray array];
id obj;
while ((obj = [self nextObject])) {
[objects addObject:obj];
}
return objects;
NSMutableArray *objects = [NSMutableArray array];
id obj;
while ((obj = [self nextObject])) {
[objects addObject:obj];
}
return objects;
}
- (id)nextObject {
if ([mToVisit count] == 0) {
return nil;
}
id mime = [mToVisit objectAtIndex:0];
if ([mime isKindOfClass:[CTMIME_MessagePart class]]) {
if ([mime content] != nil) {
[mToVisit addObject:[mime content]];
}
}
else if ([mime isKindOfClass:[CTMIME_MultiPart class]]) {
NSEnumerator *enumer = [[mime content] objectEnumerator];
CTMIME *subpart;
while ((subpart = [enumer nextObject])) {
[mToVisit addObject:subpart];
}
}
[mToVisit removeObjectAtIndex:0];
return mime;
if ([mToVisit count] == 0) {
return nil;
}
id mime = [mToVisit objectAtIndex:0];
if ([mime isKindOfClass:[CTMIME_MessagePart class]]) {
if ([mime content] != nil) {
[mToVisit addObject:[mime content]];
}
}
else if ([mime isKindOfClass:[CTMIME_MultiPart class]]) {
NSEnumerator *enumer = [[mime content] objectEnumerator];
CTMIME *subpart;
while ((subpart = [enumer nextObject])) {
[mToVisit addObject:subpart];
}
}
[mToVisit removeObjectAtIndex:0];
return mime;
}
- (void)dealloc {
[mToVisit release];
[super dealloc];
[mToVisit release];
[super dealloc];
}
@end
@@ -1,7 +1,7 @@
/*
* MailCore
*
* Copyright (C) 2007 - Matt Ronge
* Copyright (C) 2012 - Matt Ronge
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -29,19 +29,12 @@
* SUCH DAMAGE.
*/
#import <Foundation/Foundation.h>
#import "CTMIME_SinglePart.h"
#import <Cocoa/Cocoa.h>
//TODO Document me
//TODO Eventually CTCoreMessage should inherit from this
@interface CTBareMessage : NSObject {
NSString *mUid;
unsigned int mFlags;
@interface CTMIME_HtmlPart : CTMIME_SinglePart {
}
@property(retain) NSString *uid;
@property unsigned int flags;
- (id)init;
- (unsigned int)hash;
- (BOOL)isEqual:(id)anObject;
+ (id)mimeTextPartWithString:(NSString *)str;
- (id)initWithString:(NSString *)string;
- (void)setString:(NSString *)str;
@end
+112
View File
@@ -0,0 +1,112 @@
/*
* MailCore
*
* Copyright (C) 2012 - Matt Ronge
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the MailCore project nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#import "CTMIME_HtmlPart.h"
#import <libetpan/libetpan.h>
#import "MailCoreTypes.h"
@implementation CTMIME_HtmlPart
+ (id)mimeTextPartWithString:(NSString *)str {
return [[[CTMIME_HtmlPart alloc] initWithString:str] autorelease];
}
- (id)initWithString:(NSString *)string {
self = [super init];
if (self) {
[self setString:string];
}
return self;
}
- (id)content {
if (mMimeFields != NULL) {
// We are decoding from an existing msg so read
// the charset and convert from that to UTF-8
char *converted;
size_t converted_len;
char *source_charset = mMimeFields->fld_content_charset;
if (source_charset == NULL) {
source_charset = DEST_CHARSET;
}
int r = charconv_buffer(DEST_CHARSET, source_charset,
self.data.bytes, self.data.length,
&converted, &converted_len);
NSString *str = @"";
if (r == MAIL_CHARCONV_NO_ERROR) {
NSData *newData = [NSData dataWithBytes:converted length:converted_len];
str = [[[NSString alloc] initWithData:newData encoding:NSUTF8StringEncoding] autorelease];
}
charconv_buffer_free(converted);
return str;
} else {
// Don't have a charset available so treat data as UTF-8
// This will happen when we are creating a msg and not decoding
// an existing one
return [[[NSString alloc] initWithData:self.data encoding:NSUTF8StringEncoding] autorelease];
}
}
- (void)setString:(NSString *)str {
self.data = [str dataUsingEncoding:NSUTF8StringEncoding];
// The data is all local, so we don't want it to do any fetching
self.fetched = YES;
}
- (struct mailmime *)buildMIMEStruct {
struct mailmime_fields *mime_fields;
struct mailmime *mime_sub;
struct mailmime_content *content;
struct mailmime_parameter *param;
struct mailmime_disposition *disposition;
struct mailmime_mechanism *encoding;
int r;
/* text/html part */
encoding = mailmime_mechanism_new(MAILMIME_MECHANISM_QUOTED_PRINTABLE, NULL);
disposition = mailmime_disposition_new_with_data(MAILMIME_DISPOSITION_TYPE_INLINE, NULL, NULL, NULL, NULL, -1);
mime_fields = mailmime_fields_new_with_data(encoding, NULL, NULL, disposition, NULL);
content = mailmime_content_new_with_str("text/html");
param = mailmime_parameter_new(strdup("charset"), strdup(DEST_CHARSET));
r = clist_append(content->ct_parameters, param);
mime_sub = mailmime_new_empty(content, mime_fields);
assert(mime_sub != NULL);
NSString *str = [self content];
NSData * data = [str dataUsingEncoding:NSUTF8StringEncoding];
r = mailmime_set_body_text(mime_sub, strdup([data bytes]), [data length]);
return mime_sub;
}
@end
+4 -3
View File
@@ -29,16 +29,17 @@
* SUCH DAMAGE.
*/
#import <Cocoa/Cocoa.h>
#import <Foundation/Foundation.h>
#import "CTMIME.h"
@interface CTMIME_MessagePart : CTMIME {
CTMIME *myMessageContent;
struct mailimf_fields *myFields;
CTMIME *myMessageContent;
struct mailimf_fields *myFields;
}
+ (id)mimeMessagePartWithContent:(CTMIME *)mime;
- (id)initWithContent:(CTMIME *)messageContent;
- (void)setContent:(CTMIME *)aContent;
- (CTMIME *)content;
- (void)setIMFFields:(struct mailimf_fields *)imfFields;
@end
+28 -26
View File
@@ -31,57 +31,59 @@
#import "CTMIME_MessagePart.h"
#import "libetpan.h"
#import <libetpan/libetpan.h>
#import "MailCoreTypes.h"
#import "CTMIMEFactory.h"
@implementation CTMIME_MessagePart
+ (id)mimeMessagePartWithContent:(CTMIME *)mime {
return [[[CTMIME_MessagePart alloc] initWithContent:mime] autorelease];
return [[[CTMIME_MessagePart alloc] initWithContent:mime] autorelease];
}
- (id)initWithMIMEStruct:(struct mailmime *)mime
forMessage:(struct mailmessage *)message {
self = [super initWithMIMEStruct:mime forMessage:message];
if (self) {
struct mailmime *content = mime->mm_data.mm_message.mm_msg_mime;
myMessageContent = [[CTMIMEFactory createMIMEWithMIMEStruct:content
forMessage:message] retain];
myFields = mime->mm_data.mm_message.mm_fields;
}
return self;
forMessage:(struct mailmessage *)message {
self = [super initWithMIMEStruct:mime forMessage:message];
if (self) {
struct mailmime *content = mime->mm_data.mm_message.mm_msg_mime;
myMessageContent = [[CTMIMEFactory createMIMEWithMIMEStruct:content
forMessage:message] retain];
myFields = mime->mm_data.mm_message.mm_fields;
}
return self;
}
- (id)initWithContent:(CTMIME *)messageContent {
self = [super init];
if (self) {
[self setContent:messageContent];
}
return self;
self = [super init];
if (self) {
[self setContent:messageContent];
}
return self;
}
- (void)dealloc {
[myMessageContent release];
[super dealloc];
[myMessageContent release];
[super dealloc];
}
- (void)setContent:(CTMIME *)aContent {
[aContent retain];
[myMessageContent release];
myMessageContent = aContent;
[aContent retain];
[myMessageContent release];
myMessageContent = aContent;
}
- (id)content {
return myMessageContent;
return myMessageContent;
}
- (struct mailmime *)buildMIMEStruct {
struct mailmime *mime = mailmime_new_message_data([myMessageContent buildMIMEStruct]);
mailmime_set_imf_fields(mime, myFields);
return mime;
struct mailmime *mime = mailmime_new_message_data([myMessageContent buildMIMEStruct]);
if (myFields != NULL) {
mailmime_set_imf_fields(mime, myFields);
}
return mime;
}
- (void)setIMFFields:(struct mailimf_fields *)imfFields {
myFields = imfFields;
myFields = imfFields;
}
@end
+2 -2
View File
@@ -29,11 +29,11 @@
* SUCH DAMAGE.
*/
#import <Cocoa/Cocoa.h>
#import <Foundation/Foundation.h>
#import "CTMIME.h"
@interface CTMIME_MultiPart : CTMIME {
NSMutableArray *myContentList;
NSMutableArray *myContentList;
}
+ (id)mimeMultiPart;
- (void)addMIMEPart:(CTMIME *)mime;
+33 -33
View File
@@ -30,63 +30,63 @@
*/
#import "CTMIME_MultiPart.h"
#import "libetpan.h"
#import "CTMIME_MessagePart.h"
#import <libetpan/libetpan.h>
#import "MailCoreTypes.h"
#import "CTMIMEFactory.h"
@implementation CTMIME_MultiPart
+ (id)mimeMultiPart {
return [[[CTMIME_MultiPart alloc] init] autorelease];
return [[[CTMIME_MultiPart alloc] init] autorelease];
}
- (id)initWithMIMEStruct:(struct mailmime *)mime forMessage:(struct mailmessage *)message {
self = [super initWithMIMEStruct:mime forMessage:message];
if (self) {
myContentList = [[NSMutableArray alloc] init];
clistiter *cur = clist_begin(mime->mm_data.mm_multipart.mm_mp_list);
for (; cur != NULL; cur=clist_next(cur)) {
CTMIME *content = [CTMIMEFactory createMIMEWithMIMEStruct:clist_content(cur) forMessage:message];
if (content != nil) {
[myContentList addObject:content];
}
}
}
return self;
self = [super initWithMIMEStruct:mime forMessage:message];
if (self) {
myContentList = [[NSMutableArray alloc] init];
clistiter *cur = clist_begin(mime->mm_data.mm_multipart.mm_mp_list);
for (; cur != NULL; cur=clist_next(cur)) {
CTMIME *content = [CTMIMEFactory createMIMEWithMIMEStruct:clist_content(cur) forMessage:message];
if (content != nil) {
[myContentList addObject:content];
}
}
}
return self;
}
- (id)init {
self = [super init];
if (self) {
myContentList = [[NSMutableArray alloc] init];
}
return self;
self = [super init];
if (self) {
myContentList = [[NSMutableArray alloc] init];
self.contentType = @"multipart/mixed";
}
return self;
}
- (void)dealloc {
[myContentList release];
[super dealloc];
[myContentList release];
[super dealloc];
}
- (void)addMIMEPart:(CTMIME *)mime {
[myContentList addObject:mime];
[myContentList addObject:mime];
}
- (id)content {
return myContentList;
return myContentList;
}
- (struct mailmime *)buildMIMEStruct {
//TODO make this smarter so it builds different types other than multipart/mixed
struct mailmime *mime = mailmime_multiple_new("multipart/mixed");
struct mailmime *mime = mailmime_multiple_new([self.contentType UTF8String]);
NSEnumerator *enumer = [myContentList objectEnumerator];
CTMIME *part;
int r;
while ((part = [enumer nextObject])) {
r = mailmime_add_part(mime, [part buildMIMEStruct]);
assert(r == 0);
}
return mime;
NSEnumerator *enumer = [myContentList objectEnumerator];
CTMIME *part;
while ((part = [enumer nextObject])) {
mailmime_smart_add_part(mime, [part buildMIMEStruct]);
}
return mime;
}
@end
+26 -13
View File
@@ -29,24 +29,37 @@
* SUCH DAMAGE.
*/
#import <Cocoa/Cocoa.h>
#import <Foundation/Foundation.h>
#import "CTMIME.h"
@interface CTMIME_SinglePart : CTMIME {
struct mailmime *mMime;
struct mailmessage *mMessage;
typedef void (^CTProgressBlock)(size_t curr, size_t max);
NSData *mData;
BOOL mAttached;
BOOL mFetched;
NSString *mFilename;
@interface CTMIME_SinglePart : CTMIME {
struct mailmime *mMime;
struct mailmessage *mMessage;
struct mailmime_single_fields *mMimeFields;
NSData *mData;
BOOL mAttached;
BOOL mFetched;
NSString *mFilename;
NSString *mContentId;
NSError *lastError;
}
@property BOOL attached;
@property BOOL fetched;
@property(retain) NSString *filename;
@property(retain) NSData *data;
@property(nonatomic) BOOL attached;
@property(nonatomic) BOOL fetched;
@property(nonatomic, retain) NSString *filename;
@property(nonatomic, retain) NSString *contentId;
@property(nonatomic, retain) NSData *data;
@property(nonatomic, readonly) size_t size;
/*
If an error occurred (nil or return of NO) call this method to get the error
*/
@property(nonatomic, retain) NSError *lastError;
+ (id)mimeSinglePartWithData:(NSData *)data;
- (id)initWithData:(NSData *)data;
- (void)fetchPart;
- (BOOL)fetchPart;
- (BOOL)fetchPartWithProgress:(CTProgressBlock)block;
@end
+178 -86
View File
@@ -31,118 +31,210 @@
#import "CTMIME_SinglePart.h"
#import "libetpan.h"
#import <libetpan/libetpan.h>
#import "MailCoreTypes.h"
#import "MailCoreUtilities.h"
static inline struct imap_session_state_data *
get_session_data(mailmessage * msg)
{
return msg->msg_session->sess_data;
}
static inline mailimap * get_imap_session(mailmessage * msg)
{
return get_session_data(msg)->imap_session;
}
static void download_progress_callback(size_t current, size_t maximum, void * context) {
CTProgressBlock block = context;
block(current, maximum);
}
@interface CTMIME_SinglePart ()
@end
@implementation CTMIME_SinglePart
@synthesize attached=mAttached;
@synthesize filename=mFilename;
@synthesize contentId=mContentId;
@synthesize data=mData;
@synthesize fetched=mFetched;
@synthesize lastError;
+ (id)mimeSinglePartWithData:(NSData *)data {
return [[[CTMIME_SinglePart alloc] initWithData:data] autorelease];
return [[[CTMIME_SinglePart alloc] initWithData:data] autorelease];
}
- (id)initWithData:(NSData *)data {
self = [super init];
if (self) {
self.data = data;
self.fetched = YES;
}
return self;
self = [super init];
if (self) {
self.data = data;
self.fetched = YES;
}
return self;
}
- (id)initWithMIMEStruct:(struct mailmime *)mime
forMessage:(struct mailmessage *)message {
self = [super initWithMIMEStruct:mime forMessage:message];
if (self) {
self.data = nil;
mMime = mime;
mMessage = message;
self.fetched = NO;
struct mailmime_single_fields *mimeFields = NULL;
mimeFields = mailmime_single_fields_new(mMime->mm_mime_fields, mMime->mm_content_type);
if (mimeFields != NULL) {
struct mailmime_disposition *disp = mimeFields->fld_disposition;
if (disp != NULL) {
if (disp->dsp_type != NULL) {
self.attached = (disp->dsp_type->dsp_type ==
MAILMIME_DISPOSITION_TYPE_ATTACHMENT);
}
}
if (mimeFields->fld_disposition_filename != NULL) {
self.filename = [NSString stringWithCString:mimeFields->fld_disposition_filename
encoding:NSASCIIStringEncoding];
}
mailmime_single_fields_free(mimeFields);
}
}
return self;
forMessage:(struct mailmessage *)message {
self = [super initWithMIMEStruct:mime forMessage:message];
if (self) {
self.data = nil;
mMime = mime;
mMessage = message;
self.fetched = NO;
mMimeFields = mailmime_single_fields_new(mMime->mm_mime_fields, mMime->mm_content_type);
if (mMimeFields != NULL) {
struct mailmime_disposition *disp = mMimeFields->fld_disposition;
if (disp != NULL) {
if (disp->dsp_type != NULL) {
self.attached = (disp->dsp_type->dsp_type ==
MAILMIME_DISPOSITION_TYPE_ATTACHMENT);
if (self.attached)
{
// MWA workaround for bug where specific emails look like this:
// Content-Type: application/vnd.ms-excel; name="=?UTF-8?B?TVhBVC0zMTFfcGFja2xpc3QxMTA0MDAueGxz?="
// Content-Disposition: attachment
// - usually they look like -
// Content-Type: image/jpeg; name="photo.JPG"
// Content-Disposition: attachment; filename="photo.JPG"
if (mMimeFields->fld_disposition_filename == NULL && mMimeFields->fld_content_name != NULL)
mMimeFields->fld_disposition_filename = mMimeFields->fld_content_name;
}
}
}
if (mMimeFields->fld_disposition_filename != NULL) {
self.filename = [NSString stringWithCString:mMimeFields->fld_disposition_filename encoding:NSUTF8StringEncoding];
if (mMimeFields->fld_id != NULL)
self.contentId = [NSString stringWithCString:mMimeFields->fld_id encoding:NSUTF8StringEncoding];
NSString* lowercaseName = [self.filename lowercaseString];
if([lowercaseName hasSuffix:@".xls"] ||
[lowercaseName hasSuffix:@".xlsx"] ||
[lowercaseName hasSuffix:@".key.zip"] ||
[lowercaseName hasSuffix:@".numbers.zip"] ||
[lowercaseName hasSuffix:@".pages.zip"] ||
[lowercaseName hasSuffix:@".pdf"] ||
[lowercaseName hasSuffix:@".ppt"] ||
[lowercaseName hasSuffix:@".doc"] ||
[lowercaseName hasSuffix:@".docx"] ||
[lowercaseName hasSuffix:@".rtf"] ||
[lowercaseName hasSuffix:@".rtfd.zip"] ||
[lowercaseName hasSuffix:@".key"] ||
[lowercaseName hasSuffix:@".numbers"] ||
[lowercaseName hasSuffix:@".pages"] ||
[lowercaseName hasSuffix:@".png"] ||
[lowercaseName hasSuffix:@".gif"] ||
[lowercaseName hasSuffix:@".png"] ||
[lowercaseName hasSuffix:@".jpg"] ||
[lowercaseName hasSuffix:@".jpeg"] ||
[lowercaseName hasSuffix:@".tiff"]) { // hack by gabor, improved by waseem, based on http://developer.apple.com/iphone/library/qa/qa2008/qa1630.html
self.attached = YES;
}
}
}
}
return self;
}
- (void)fetchPart {
if (self.fetched == NO) {
struct mailmime_single_fields *mimeFields = NULL;
int encoding = MAILMIME_MECHANISM_8BIT;
mimeFields = mailmime_single_fields_new(mMime->mm_mime_fields, mMime->mm_content_type);
if (mimeFields != NULL && mimeFields->fld_encoding != NULL)
encoding = mimeFields->fld_encoding->enc_type;
char *fetchedData;
size_t fetchedDataLen;
int r;
r = mailmessage_fetch_section(mMessage, mMime, &fetchedData, &fetchedDataLen);
if (r != MAIL_NO_ERROR) {
mailmessage_fetch_result_free(mMessage, fetchedData);
RaiseException(CTMIMEParseError, CTMIMEParseErrorDesc);
}
- (BOOL)fetchPartWithProgress:(CTProgressBlock)block {
if (self.fetched == NO) {
struct mailmime_single_fields *mimeFields = NULL;
size_t current_index = 0;
char * result;
size_t result_len;
r = mailmime_part_parse(fetchedData, fetchedDataLen, &current_index,
encoding, &result, &result_len);
if (r != MAILIMF_NO_ERROR) {
mailmime_decoded_part_free(result);
RaiseException(CTMIMEParseError, CTMIMEParseErrorDesc);
}
NSData *data = [NSData dataWithBytes:result length:result_len];
mailmessage_fetch_result_free(mMessage, fetchedData);
mailmime_decoded_part_free(result);
mailmime_single_fields_free(mimeFields);
self.data = data;
self.fetched = YES;
}
int encoding = MAILMIME_MECHANISM_8BIT;
mimeFields = mailmime_single_fields_new(mMime->mm_mime_fields, mMime->mm_content_type);
if (mimeFields != NULL && mimeFields->fld_encoding != NULL)
encoding = mimeFields->fld_encoding->enc_type;
char *fetchedData = NULL;
size_t fetchedDataLen;
int r;
if (mMessage->msg_session != NULL) {
mailimap_set_progress_callback(get_imap_session(mMessage), &download_progress_callback, NULL, block);
}
r = mailmessage_fetch_section(mMessage, mMime, &fetchedData, &fetchedDataLen);
if (mMessage->msg_session != NULL) {
mailimap_set_progress_callback(get_imap_session(mMessage), NULL, NULL, NULL);
}
if (r != MAIL_NO_ERROR) {
if (fetchedData) {
mailmessage_fetch_result_free(mMessage, fetchedData);
}
self.lastError = MailCoreCreateErrorFromIMAPCode(r);
return NO;
}
size_t current_index = 0;
char * result;
size_t result_len;
r = mailmime_part_parse(fetchedData, fetchedDataLen, &current_index,
encoding, &result, &result_len);
if (r != MAILIMF_NO_ERROR) {
mailmime_decoded_part_free(result);
self.lastError = MailCoreCreateError(r, @"Error parsing the message");
return NO;
}
NSData *data = [NSData dataWithBytes:result length:result_len];
mailmessage_fetch_result_free(mMessage, fetchedData);
mailmime_decoded_part_free(result);
mailmime_single_fields_free(mimeFields);
self.data = data;
self.fetched = YES;
}
return YES;
}
- (BOOL)fetchPart {
return [self fetchPartWithProgress:^(size_t curr, size_t max){}];
}
//TODO need to do content disposition
- (struct mailmime *)buildMIMEStruct {
struct mailmime_fields *mime_fields;
struct mailmime *mime_sub;
struct mailmime_content *content;
int r;
struct mailmime_fields *mime_fields;
struct mailmime *mime_sub;
struct mailmime_content *content;
int r;
mime_fields = mailmime_fields_new_encoding(MAILMIME_MECHANISM_BASE64);
assert(mime_fields != NULL);
if (mFilename) {
char *charData = (char *)[mFilename cStringUsingEncoding:NSUTF8StringEncoding];
char *dupeData = malloc(strlen(charData));
strcpy(dupeData, charData);
mime_fields = mailmime_fields_new_filename( MAILMIME_DISPOSITION_TYPE_ATTACHMENT,
dupeData,
MAILMIME_MECHANISM_BASE64 );
} else {
mime_fields = mailmime_fields_new_encoding(MAILMIME_MECHANISM_BASE64);
}
content = mailmime_content_new_with_str([self.contentType cStringUsingEncoding:NSUTF8StringEncoding]);
mime_sub = mailmime_new_empty(content, mime_fields);
content = mailmime_content_new_with_str([self.contentType cStringUsingEncoding:NSASCIIStringEncoding]);
assert(content != NULL);
mime_sub = mailmime_new_empty(content, mime_fields);
assert(mime_sub != NULL);
r = mailmime_set_body_text(mime_sub, (char *)[self.data bytes], [self.data length]);
assert(r == MAILIMF_NO_ERROR);
return mime_sub;
// Add Data
r = mailmime_set_body_text(mime_sub, (char *)[self.data bytes], [self.data length]);
return mime_sub;
}
- (size_t)size {
if (mMime) {
return mMime->mm_length;
}
return 0;
}
- (void)dealloc {
[mData release];
[mFilename release];
//The structs are held by CTCoreMessage so we don't have to free them
[super dealloc];
mailmime_single_fields_free(mMimeFields);
[mData release];
[mFilename release];
[mContentId release];
self.lastError = nil;
//The structs are held by CTCoreMessage so we don't have to free them
[super dealloc];
}
@end
+1 -1
View File
@@ -29,7 +29,7 @@
* SUCH DAMAGE.
*/
#import <Cocoa/Cocoa.h>
#import <Foundation/Foundation.h>
#import "CTMIME_SinglePart.h"
@interface CTMIME_TextPart : CTMIME_SinglePart {
+52 -38
View File
@@ -31,60 +31,74 @@
#import "CTMIME_TextPart.h"
#import "libetpan.h"
#import <libetpan/libetpan.h>
#import "MailCoreTypes.h"
@implementation CTMIME_TextPart
+ (id)mimeTextPartWithString:(NSString *)str {
return [[[CTMIME_TextPart alloc] initWithString:str] autorelease];
return [[[CTMIME_TextPart alloc] initWithString:str] autorelease];
}
- (id)initWithString:(NSString *)string {
self = [super init];
if (self) {
[self setString:string];
}
return self;
self = [super init];
if (self) {
[self setString:string];
}
return self;
}
- (id)content {
NSString *str = [[NSString alloc] initWithData:self.data encoding:NSASCIIStringEncoding];
return [str autorelease];
if (mMimeFields != NULL) {
// We are decoding from an existing msg so read
// the charset and convert from that to UTF-8
char *converted;
size_t converted_len;
char *source_charset = mMimeFields->fld_content_charset;
if (source_charset == NULL) {
source_charset = DEST_CHARSET;
}
int r = charconv_buffer(DEST_CHARSET, source_charset,
self.data.bytes, self.data.length,
&converted, &converted_len);
NSString *str = @"";
if (r == MAIL_CHARCONV_NO_ERROR) {
NSData *newData = [NSData dataWithBytes:converted length:converted_len];
str = [[[NSString alloc] initWithData:newData encoding:NSUTF8StringEncoding] autorelease];
}
charconv_buffer_free(converted);
return str;
} else {
// Don't have a charset available so treat data as UTF-8
// This will happen when we are creating a msg and not decoding
// an existing one
return [[[NSString alloc] initWithData:self.data encoding:NSUTF8StringEncoding] autorelease];
}
}
- (void)setString:(NSString *)str {
self.data = [str dataUsingEncoding:NSASCIIStringEncoding];
// The data is all local, so we don't want it to do any fetching
self.fetched = YES;
self.data = [str dataUsingEncoding:NSUTF8StringEncoding];
// The data is all local, so we don't want it to do any fetching
self.fetched = YES;
}
- (struct mailmime *)buildMIMEStruct {
struct mailmime_fields *mime_fields;
struct mailmime *mime_sub;
struct mailmime_content *content;
struct mailmime_parameter *param;
int r;
struct mailmime_fields *mime_fields;
struct mailmime *mime_sub;
struct mailmime_content *content;
struct mailmime_parameter *param;
int r;
/* text/plain part */
//TODO this needs to be changed, something other than 8BIT should be used
mime_fields = mailmime_fields_new_encoding(MAILMIME_MECHANISM_8BIT);
assert(mime_fields != NULL);
content = mailmime_content_new_with_str("text/plain");
assert(content != NULL);
param = mailmime_parameter_new(strdup("charset"), strdup(DEST_CHARSET));
assert(param != NULL);
r = clist_append(content->ct_parameters, param);
assert(r >= 0);
mime_sub = mailmime_new_empty(content, mime_fields);
assert(mime_sub != NULL);
NSString *str = [self content];
//TODO is strdup necessary?
r = mailmime_set_body_text(mime_sub, strdup([str cStringUsingEncoding:NSASCIIStringEncoding]), [str length]);
assert(r == MAILIMF_NO_ERROR);
return mime_sub;
/* text/plain part */
mime_fields = mailmime_fields_new_encoding(MAILMIME_MECHANISM_QUOTED_PRINTABLE);
content = mailmime_content_new_with_str("text/plain");
param = mailmime_parameter_new(strdup("charset"), strdup(DEST_CHARSET));
r = clist_append(content->ct_parameters, param);
mime_sub = mailmime_new_empty(content, mime_fields);
NSString *str = [self content];
NSData * data = [str dataUsingEncoding:NSUTF8StringEncoding];
r = mailmime_set_body_text(mime_sub, strdup([data bytes]), [data length]);
return mime_sub;
}
@end
+21 -15
View File
@@ -29,26 +29,32 @@
* SUCH DAMAGE.
*/
#import <Cocoa/Cocoa.h>
#import "libetpan.h"
#import <Foundation/Foundation.h>
#import <libetpan/libetpan.h>
/*!
@class CTSMTP
This class is used internally by CTSMTPConnection for SMTP connections, clients
should not use this directly.
/*
This class is used internally by CTSMTPConnection for SMTP connections, clients
should not use this directly.
*/
@interface CTSMTP : NSObject {
mailsmtp *mySMTP; /* This resource is created and freed by CTSMTPConnection */
mailsmtp *mySMTP; /* This resource is created and freed by CTSMTPConnection */
NSError *lastError;
}
/*
If an error occurred (nil or return of NO) call this method to get the error
*/
@property(nonatomic, retain) NSError *lastError;
- (id)initWithResource:(mailsmtp *)smtp;
- (void)connectToServer:(NSString *)server port:(unsigned int)port;
- (bool)helo;
- (void)startTLS;
- (void)authenticateWithUsername:(NSString *)username password:(NSString *)password server:(NSString *)server;
- (void)setFrom:(NSString *)fromAddress;
- (void)setRecipients:(id)recipients;
- (void)setRecipientAddress:(NSString *)recAddress;
- (void)setData:(NSString *)data;
- (BOOL)connectToServer:(NSString *)server port:(unsigned int)port;
- (BOOL)connectWithTlsToServer:(NSString *)server port:(unsigned int)port;
- (BOOL)helo;
- (BOOL)startTLS;
- (BOOL)authenticateWithUsername:(NSString *)username password:(NSString *)password server:(NSString *)server;
- (BOOL)setFrom:(NSString *)fromAddress;
- (BOOL)setRecipients:(id)recipients;
- (BOOL)setRecipientAddress:(NSString *)recAddress;
- (BOOL)setData:(NSString *)data;
- (mailsmtp *)resource;
@end
+91 -54
View File
@@ -33,73 +33,110 @@
#import "CTCoreAddress.h"
#import "CTCoreMessage.h"
#import "MailCoreTypes.h"
#import "MailCoreUtilities.h"
@implementation CTSMTP
@synthesize lastError;
- (id)initWithResource:(mailsmtp *)smtp {
self = [super init];
if (self) {
mySMTP = smtp;
}
return self;
self = [super init];
if (self) {
mySMTP = smtp;
}
return self;
}
- (void)dealloc {
self.lastError = nil;
[super dealloc];
}
- (BOOL)connectToServer:(NSString *)server port:(unsigned int)port {
/* first open the stream */
int ret = mailsmtp_socket_connect([self resource], [server cStringUsingEncoding:NSUTF8StringEncoding], port);
if (ret != MAIL_NO_ERROR) {
self.lastError = MailCoreCreateErrorFromSMTPCode(ret);
return NO;
}
return YES;
}
- (BOOL)connectWithTlsToServer:(NSString *)server port:(unsigned int)port {
/* first open the stream */
int ret = mailsmtp_ssl_connect([self resource], [server cStringUsingEncoding:NSUTF8StringEncoding], port);
if (ret != MAIL_NO_ERROR) {
self.lastError = MailCoreCreateErrorFromSMTPCode(ret);
return NO;
}
return YES;
}
- (BOOL)helo {
/* The server doesn't support esmtp, so try regular smtp */
int ret = mailsmtp_helo([self resource]);
if (ret != MAIL_NO_ERROR) {
self.lastError = MailCoreCreateErrorFromSMTPCode(ret);
return NO;
}
return YES; /* The server supports helo so return YES */
}
- (BOOL)startTLS {
return YES;
}
- (BOOL)authenticateWithUsername:(NSString *)username password:(NSString *)password server:(NSString *)server {
return YES;
}
- (BOOL)setFrom:(NSString *)fromAddress {
int ret = mailsmtp_mail([self resource], [fromAddress cStringUsingEncoding:NSUTF8StringEncoding]);
if (ret != MAIL_NO_ERROR) {
self.lastError = MailCoreCreateErrorFromSMTPCode(ret);
return NO;
}
return YES;
}
- (void)connectToServer:(NSString *)server port:(unsigned int)port {
/* first open the stream */
int ret = mailsmtp_socket_connect([self resource], [server cStringUsingEncoding:NSASCIIStringEncoding], port);
IfTrue_RaiseException(ret != MAILSMTP_NO_ERROR, CTSMTPSocket, CTSMTPSocketDesc);
- (BOOL)setRecipients:(id)recipients {
NSEnumerator *objEnum = [recipients objectEnumerator];
CTCoreAddress *rcpt;
while ((rcpt = [objEnum nextObject])) {
BOOL success = [self setRecipientAddress:[rcpt email]];
if (!success) {
return NO;
}
}
return YES;
}
- (bool)helo {
/* The server doesn't support esmtp, so try regular smtp */
int ret = mailsmtp_helo([self resource]);
IfTrue_RaiseException(ret != MAILSMTP_NO_ERROR, CTSMTPHello, CTSMTPHelloDesc);
return YES; /* The server supports helo so return YES */
- (BOOL)setRecipientAddress:(NSString *)recAddress {
int ret = mailsmtp_rcpt([self resource], [recAddress cStringUsingEncoding:NSUTF8StringEncoding]);
if (ret != MAIL_NO_ERROR) {
self.lastError = MailCoreCreateErrorFromSMTPCode(ret);
return NO;
}
return YES;
}
- (void)startTLS {
//TODO Raise exception
- (BOOL)setData:(NSString *)data {
NSData *dataObj = [data dataUsingEncoding:NSUTF8StringEncoding];
int ret = mailsmtp_data([self resource]);
if (ret != MAIL_NO_ERROR) {
self.lastError = MailCoreCreateErrorFromSMTPCode(ret);
return NO;
}
ret = mailsmtp_data_message([self resource], [dataObj bytes], [dataObj length]);
if (ret != MAIL_NO_ERROR) {
self.lastError = MailCoreCreateErrorFromSMTPCode(ret);
return NO;
}
return YES;
}
- (void)authenticateWithUsername:(NSString *)username password:(NSString *)password server:(NSString *)server {
//TODO Raise exception
}
- (void)setFrom:(NSString *)fromAddress {
int ret = mailsmtp_mail([self resource], [fromAddress cStringUsingEncoding:NSASCIIStringEncoding]);
IfTrue_RaiseException(ret != MAILSMTP_NO_ERROR, CTSMTPFrom, CTSMTPFromDesc);
}
- (void)setRecipients:(id)recipients {
NSEnumerator *objEnum = [recipients objectEnumerator];
CTCoreAddress *rcpt;
while(rcpt = [objEnum nextObject]) {
[self setRecipientAddress:[rcpt email]];
}
}
- (void)setRecipientAddress:(NSString *)recAddress {
int ret = mailsmtp_rcpt([self resource], [recAddress cStringUsingEncoding:NSASCIIStringEncoding]);
IfTrue_RaiseException(ret != MAILSMTP_NO_ERROR, CTSMTPRecipients, CTSMTPRecipientsDesc);
}
- (void)setData:(NSString *)data {
NSData *dataObj = [data dataUsingEncoding:NSASCIIStringEncoding];
int ret = mailsmtp_data([self resource]);
IfTrue_RaiseException(ret != MAILSMTP_NO_ERROR, CTSMTPData, CTSMTPDataDesc);
ret = mailsmtp_data_message([self resource], [dataObj bytes], [dataObj length]);
IfTrue_RaiseException(ret != MAILSMTP_NO_ERROR, CTSMTPData, CTSMTPDataDesc);
}
- (mailsmtp *)resource {
return mySMTP;
return mySMTP;
}
@end
+79
View File
@@ -0,0 +1,79 @@
/*
* MailCore
*
* Copyright (C) 2010 - Matt Ronge
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the MailCore project nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#import <Foundation/Foundation.h>
#import <libetpan/libetpan.h>
#import "MailCoreTypes.h"
@protocol CTSMTPConnectionDelegate
//This is called with values between 0-100 (inclusive)
-(void)smtpProgress:(unsigned int)aProgress;
-(void)smtpDidFinishSendingMessage:(CTSMTPAsyncStatus)aStatus;
@end
@class CTCoreMessage;
@class CTCoreAddress;
@class CTSMTP;
@interface CTSMTPAsyncConnection : NSObject
{
CTSMTP* mSMTPObj;
mailsmtp* mSMTP;
CTCoreMessage* mMessage;
NSDictionary* mServerSettings;
NSThread* mMailThread;
id <CTSMTPConnectionDelegate> mDelegate;
unsigned int mLastProgress;
CTSMTPAsyncStatus mStatus;
}
@property (readonly) NSDictionary* serverSettings;
@property (retain) CTCoreMessage* message;
@property (readonly) CTSMTPAsyncStatus status;
- (id)initWithServer:(NSString *)aServer
username:(NSString *)aUsername
password:(NSString *)aPassword
port:(unsigned int)aPort
useTLS:(BOOL)aTls
useAuth:(BOOL)aAuth
delegate:(id<CTSMTPConnectionDelegate>)aDelegate;
- (void)sendMessageInBackgroundAndNotify:(CTCoreMessage*)aMessage;
- (void)cancel;
- (BOOL)isBusy;
@end

Some files were not shown because too many files have changed in this diff Show More