Latest 1.0.0
Homepage https://github.com/OliverLetterer/SPLMimeEntity
License MIT
Platforms ios 7.0, requires ARC
Dependencies mimetic, CTOpenSSLWrapper
Authors

Objective-C binding to mimetic for parsing eml files.

Installation

pod 'SPLMimeEntity', '~> 1.0'

Usage

NSData *data = [NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"sample" ofType:@"eml"]];
SPLMimeEntity *mimeEntity = [[SPLMimeEntity alloc] initWithString:[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]];

Public interface

/**
 OliverLetterer ([email protected])
 ^               ^               ^
 label           mailbox         domain
 */
@interface SPLMailbox : NSObject

@property (nonatomic, readonly) NSString *mailbox;
@property (nonatomic, readonly) NSString *domain;
@property (nonatomic, readonly) NSString *label;

@end

@interface SPLBodyPart : NSObject

@property (nonatomic, readonly) NSString *name;

@property (nonatomic, readonly) NSString *contentType;
@property (nonatomic, readonly) NSData *data;

@end

@interface SPLMimeEntity : NSObject

@property (nonatomic, readonly) SPLMailbox *sender;
@property (nonatomic, readonly) NSArray *from;
@property (nonatomic, readonly) NSArray *to;

@property (nonatomic, readonly) NSString *subject;
@property (nonatomic, readonly) NSArray *replyTo;
@property (nonatomic, readonly) NSArray *cc;
@property (nonatomic, readonly) NSArray *bcc;

@property (nonatomic, readonly) NSString *messageId;

@property (nonatomic, readonly) NSString *body;
@property (nonatomic, readonly) NSArray *bodyParts;

- (instancetype)initWithString:(NSString *)string;

@end

Contact

Oliver Letterer

License

SPLMimeEntity is available under the MIT license. See the LICENSE file for more information.

Latest podspec

{
    "name": "SPLMimeEntity",
    "version": "1.0.0",
    "summary": "Parsing EML files.",
    "description": "Objective-C binding to mimetic.",
    "homepage": "https://github.com/OliverLetterer/SPLMimeEntity",
    "license": "MIT",
    "authors": {
        "Oliver Letterer": "[email protected]"
    },
    "social_media_url": "http://twitter.com/oletterer",
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/OliverLetterer/SPLMimeEntity.git",
        "tag": "1.0.0"
    },
    "source_files": "SPLMimeEntity",
    "dependencies": {
        "mimetic": [
            "~> 0.9.7"
        ],
        "CTOpenSSLWrapper": [
            "~> 1.2.0"
        ]
    },
    "requires_arc": true
}

Pin It on Pinterest

Share This