我正在使用 MailCore 框架准备 Mail iOS 应用程序。在撰写新邮件时,我如何为我的邮件设置 UID,因为邮件正在发送,但它不会移动或复制到已发送的邮箱或草稿文件夹。当我复制或移动消息时,它会在线崩溃..
NSString *uid = [msg uid];
在 CTCoreFolder 类中,在这些方法中..
- (void)copyMessage: (NSString *)path forMessage:(CTCoreMessage *)msg
- (void)moveMessage: (NSString *)path forMessage:(CTCoreMessage *)msg
当我通过这种方式创建和发送消息时......
CTCoreMessage *msg = [[CTCoreMessage alloc] init];
CTCoreAddress *fromAddress = [[CTCoreAddress alloc] initWithName:@"name" email:@"name@mailserver.com"];
CTCoreAddress *address3 = [[CTCoreAddress alloc] initWithName:@"person" email:@"person@rcscentralmail.com"];
[msg setFrom:[NSSet setWithObject:fromAddress]];
[msg setTo:[NSSet setWithObject:address3]];
[msg setSubject:@"Test simple appfdgfghbfghb"];
[CTSMTPConnection sendMessage:msg server:@"mail.mailserver.com" username:@"abc@mailserver.com"
password:@"abcdef" port:587 useTLS:NO useAuth:YES];
调用连接到服务器后,我调用移动或复制方法,如 ::
[folder moveMessage:@"INBOX.Sent" forMessage:message];
请帮忙。