测试已测试 | ✗ |
语言语言 | Objective C++Objective C++ |
许可证 | MIT |
发布最后发布 | 2014年12月 |
由 Oliver Letterer 维护。
依赖 | |
mimetic | ~> 0.9.7 |
CTOpenSSLWrapper | ~> 1.2.0 |
Objective-C binding to mimetic for parsing eml files.
pod 'SPLMimeEntity', '~> 1.0'
NSData *data = [NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"sample" ofType:@"eml"]];
SPLMimeEntity *mimeEntity = [[SPLMimeEntity alloc] initWithString:[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]];
/**
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
Oliver Letterer
SPLMimeEntity 在 MIT 许可下可用。有关更多信息,请参阅 LICENSE 文件。