資源簡(jiǎn)介
下載先看readme.txt 里面有使用說(shuō)明,如果您使用我的項(xiàng)目還有問(wèn)題里面有我的qq聯(lián)系方式 希望對(duì)您有所幫助!!! mailcore 非常強(qiáng)大 最近在做郵件模塊 把pop3 imap 代收和發(fā)送郵件完成了 里面是demo 都寫好了 無(wú)UI效果! 已經(jīng)是一個(gè)無(wú)UI的客戶端了 支持imap pop3 代收和發(fā)送郵件 郵件和解析eml文件 支持ios所有操作系統(tǒng) !
代碼片段和文件信息
//
//??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?????????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?????????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?????????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?????????????NSString?*fileName?=?[fileNameList?
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????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個(gè)文件信息
評(píng)論
共有 條評(píng)論