资源简介
下载先看readme.txt 里面有使用说明,如果您使用我的项目还有问题里面有我的qq联系方式 希望对您有所帮助!!! mailcore 非常强大 最近在做邮件模块 把pop3 imap 代收和发送邮件完成了 里面是demo 都写好了 无UI效果! 已经是一个无UI的客户端了 支持imap pop3 代收和发送邮件 邮件和解析eml文件 支持ios所有操作系统 !
代码片段和文件信息
//
// MailParseBuild.m
// EmlTest
//
// Created by mengxianzhi on 15-4-14.
// Copyright (c) 2015年 mengxianzhi. All rights reserved.
//
#import “MailBuild.h“
@interface MailBuild()
@property (copy nonatomic) NSMutableArray *mutableListTo;
@property (copy nonatomic) NSMutableArray *mutableListCc;
@property (copy nonatomic) NSMutableArray *mutableListBcc;
@property (strong nonatomic) NSMutableArray *partsList;
@end
@implementation MailBuild
- (instancetype) init{
if (self == [super init]) {
_mutableListTo = [[NSMutableArray alloc]init];
_mutableListCc = [[NSMutableArray alloc]init];
_mutableListBcc = [[NSMutableArray alloc]init];
_partsList = [[NSMutableArray alloc]init];
}
return self;
}
- (void)buildEmlTheme:(NSString *)theme mailBody:(NSString *)mailBody mailToDic:(NSArray *)mailToListDic mailFrom:(NSString *)mailFrom mailCCDic:(NSArray *)mailCcListDic mailBCCDic:(NSArray *)mailBccListDic imageList:(NSArray *)fileDataList fileNameList:(NSArray *)fileNameList emlData:(EmlData)emlDataBlock{
MCOMessageBuilder *builder = [[MCOMessageBuilder alloc] init];
MCOAddress *fromAdd = [MCOAddress addressWithDisplayName:[self mailNikName:mailFrom]
mailbox:mailFrom];
//收件人
for (int to = 0 ; to < mailToListDic.count ; to ++) {
NSString *toSender = [[[mailToListDic objectAtIndex:to] allValues] objectAtIndex:0];
MCOAddress *toAdd = [MCOAddress addressWithDisplayName:[self mailNikName:toSender] mailbox:toSender];
[_mutableListTo addobject:toAdd];
}
//抄送人
for (int cc = 0 ; cc < mailCcListDic.count ; cc ++) {
NSString *ccSender = [[[mailCcListDic objectAtIndex:cc] allValues] objectAtIndex:0];
MCOAddress *ccAdd = [MCOAddress addressWithDisplayName:[self mailNikName:ccSender]
mailbox:ccSender];
[_mutableListCc addobject:ccAdd];
}
//密送人
for (int bcc = 0 ; bcc < mailBccListDic.count ; bcc ++) {
NSString *bccSender = [[[mailBccListDic objectAtIndex:bcc] allValues] objectAtIndex:0];
MCOAddress *bccAdd = [MCOAddress addressWithDisplayName:[self mailNikName:bccSender]
mailbox:bccSender];
[_mutableListBcc addobject:bccAdd];
}
[[builder header] setFrom:fromAdd];
[[builder header] setTo:_mutableListTo];
[[builder header] setCc:_mutableListCc];
[[builder header] setBcc:_mutableListBcc];
[[builder header] setSubject:[NSString stringWithCString:[theme UTF8String] encoding:NSUTF8StringEncoding]];
[builder setHTMLBody:mailBody];
NSMutableArray *mocattachmentList = [[NSMutableArray alloc]initWithCapacity:fileNameList.count];
if (fileNameList.count > 0) {
for (int a = 0; a < fileNameList.count; a ++) {
NSString *fileName = [fileNameList
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2015-11-06 15:26 MailCore\
文件 8196 2015-11-06 15:26 MailCore\.DS_Store
目录 0 2015-11-06 15:26 __MACOSX\
目录 0 2015-11-06 15:26 __MACOSX\MailCore\
文件 226 2015-11-06 15:26 __MACOSX\MailCore\._.DS_Store
文件 136627 2015-04-15 10:39 MailCore\a.eml
文件 328 2015-04-15 10:39 __MACOSX\MailCore\._a.eml
目录 0 2015-11-06 15:25 MailCore\core\
文件 6148 2015-05-19 10:00 MailCore\core\.DS_Store
目录 0 2015-11-06 15:26 __MACOSX\MailCore\core\
文件 226 2015-05-19 10:00 __MACOSX\MailCore\core\._.DS_Store
文件 586 2015-04-15 12:34 MailCore\core\MailBuild.h
文件 277 2015-04-15 12:34 __MACOSX\MailCore\core\._MailBuild.h
文件 3556 2015-05-29 13:45 MailCore\core\MailBuild.m
文件 277 2015-05-29 13:45 __MACOSX\MailCore\core\._MailBuild.m
文件 1019 2015-04-15 11:02 MailCore\core\MailParse.h
文件 277 2015-04-15 11:02 __MACOSX\MailCore\core\._MailParse.h
文件 2875 2015-04-15 18:05 MailCore\core\MailParse.m
文件 277 2015-04-15 18:05 __MACOSX\MailCore\core\._MailParse.m
文件 1419 2015-04-14 14:54 MailCore\core\STMailUtils.h
文件 277 2015-04-14 14:54 __MACOSX\MailCore\core\._STMailUtils.h
文件 5387 2015-04-14 14:49 MailCore\core\STMailUtils.m
文件 277 2015-04-14 14:49 __MACOSX\MailCore\core\._STMailUtils.m
文件 1285 2015-05-22 18:45 MailCore\core\STMCOIMAPSession.h
文件 277 2015-05-22 18:45 __MACOSX\MailCore\core\._STMCOIMAPSession.h
文件 6233 2015-11-06 15:17 MailCore\core\STMCOIMAPSession.m
文件 171 2015-11-06 15:17 __MACOSX\MailCore\core\._STMCOIMAPSession.m
文件 1070 2015-05-22 18:46 MailCore\core\STMCOPOPSession.h
文件 277 2015-05-22 18:46 __MACOSX\MailCore\core\._STMCOPOPSession.h
文件 2930 2015-11-06 13:35 MailCore\core\STMCOPOPSession.m
文件 171 2015-11-06 13:35 __MACOSX\MailCore\core\._STMCOPOPSession.m
............此处省略938个文件信息
评论
共有 条评论