Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/email/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用swift在mailcore2 OSX中获取电子邮件正文_Swift_Email_Mailcore2_Mailcore - Fatal编程技术网

使用swift在mailcore2 OSX中获取电子邮件正文

使用swift在mailcore2 OSX中获取电子邮件正文,swift,email,mailcore2,mailcore,Swift,Email,Mailcore2,Mailcore,我尝试使用这个类:MCOIMAPFetchContentOperation来获取正文邮件。 但我不知道如何在swift中调用她,我也不知道哪些论点是必要的 类的描述是:这个类实现了一个获取消息内容的操作。它可以是部分或全部消息 你能帮帮我吗 你的问题有点含糊,但我想你的意思是: func loadMsg(msg: MCOIMAPMessage, folder: String) { let operation: MCOIMAPFetchContentOperation = session

我尝试使用这个类:MCOIMAPFetchContentOperation来获取正文邮件。 但我不知道如何在swift中调用她,我也不知道哪些论点是必要的

类的描述是:这个类实现了一个获取消息内容的操作。它可以是部分或全部消息


你能帮帮我吗

你的问题有点含糊,但我想你的意思是:

func loadMsg(msg: MCOIMAPMessage, folder: String) {

    let operation: MCOIMAPFetchContentOperation = session.fetchMessageByUIDOperationWithFolder(folder, uid: msg.uid)

    operation.start { (error:NSError!, data:NSData!) -> Void in
        let messageParser: MCOMessageParser = MCOMessageParser(data: data)
        let msgHTMLBody: NSString = messageParser.htmlBodyRendering()

        print ("HTML: \(msgHTMLBody)")
    }      

}