我试图发送邮件列表我收到数据库的电子邮件数组,当我发送收件人列表填充iOS 7
填充时,但当我在iOS 5
尝试收件人列表不得到填充。任何想法为什么?这是我的邮件功能MFMailComposeViewController不填充收件人在ios 5
-(void)sendEmailToContacts:(NSArray *)fList withText:(NSString *)emailText withTag:(NSInteger)tag
{
if([MFMailComposeViewController canSendMail])
{
MFMailComposeViewController *mailComposer = [[MFMailComposeViewController alloc] init];
mailComposer.view.tag=tag;
NSString *htmlBody =[NSString stringWithFormat:@"<a href=\"%@\">%@</a>",_currentAdd.contentUrl,addtext];
[mailComposer setMessageBody:htmlBody isHTML:YES];
[mailComposer setSubject:_currentMail.subject];
mailComposer.mailComposeDelegate = self;
[mailComposer setToRecipients:fList];
[self presentViewController:mailComposer animated:YES completion:nil];
}
else
{
NSLog(@"Device is unable to send email in its current state.");
}
}
我fList
(收件人列表)是一个NSArray
,这是我FLIST的样本输出
(
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]"
)
你能把breakpointed上sendEmailToContacts方法,并检查是否包含的flist指定的电子邮件列表,也可能是零? – ldindu
它是iOS6的以上 – codercat
我检查与断点作品中,包含的flist电子邮件,因为我已经张贴以上,它适用于ios7,我没有iOS6的SDK所以不知道它是否适合该 – Gamerlegend