SPLMimeEntity 1.0.0

SPLMimeEntity 1.0.0

TestsTested
LangLanguage Objective C++Objective C++
License MIT
ReleasedLast Release Dec 2014

Maintained by Oliver Letterer.



 
Depends on:
mimetic~> 0.9.7
CTOpenSSLWrapper~> 1.2.0
 

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.