I have an option to "invite all" in my device contacts email to use my iOS application through MFMailComposeViewController. Its working fine right now. But in my device, i stored 175 email contacts. So it takes time to show those email id's in bcc field. Like this,
So i decided to send 50 mails at a time. once first 50 mails sent then immediately i have to show same screen with next 50 email id's, like that i have send mails to all the contacts. In this scenario, i have to show mail compose screen for 4 times to send Email. Like this,
So Please give me some ideas to do this. My codings are,
@IBAction func act_InviteAllInContacts(sender: AnyObject)
{
var contactList : NSMutableArray = NSMutableArray()
contactList = addressBookClassObj.getContactNames() // contactList is an Array, which contains 175 email id's.
var picker = MFMailComposeViewController()
picker.mailComposeDelegate = self
picker.setSubject("Subject Name")
picker.setMessageBody("Hi! Checkout this app https://itun", isHTML: true)
picker.setBccRecipients(contactList as [AnyObject])
presentViewController(picker, animated: true, completion: nil)
}