iPhoneアプリからメールを送信していますが、正常に動作しています。これを行う方法があれば、メールにもccを追加したいです。次のコードを使用しています。これにccを追加する方法を教えてください。
ありがとう。
電子メールを送信するためのコントローラーの初期化
MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
picker.mailComposeDelegate = self;
NSString*giveFileName=@"CPAC_Contract_Equine";
NSString *fileName;
//fileName = [[NSString alloc]initWithFormat:@"%@.pdf",giveFileName];
fileName = [[NSString alloc]initWithFormat:@"%@",giveFileName];
NSString*myFileName=@"W9.pdf";
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *pdfFileName = [documentsDirectory stringByAppendingPathComponent:fileName];
NSMutableData *myPdfData = [NSMutableData dataWithContentsOfFile:pdfFileName];
NSString *pathJam = [[NSBundle mainBundle] pathForResource:@"W9" ofType:@"pdf"];
NSData *myDataJam = [NSData dataWithContentsOfFile: pathJam];
NSArray * toRecipients = [NSArray arrayWithObject:@""];
[picker setToRecipients:toRecipients];
[picker setSubject:@"CPAC Contract for Equine-Sam Veterinarian"];
[picker addAttachmentData:myPdfData mimeType:@"application/pdf" fileName:giveFileName];
NSString * emailBody =@"<html><body>Thank you for your participation in Consulting<br>Practitioner and Client Program.</br><br>Attached is the copy of your signed contract for your records<p>Please email or fax your completed W-9 form to<br>our PEI Support Team<br>Email:PEISupportServices@zoetis.com<br>Fax:800-741-1310<body></html>";
[picker setMessageBody:emailBody isHTML:YES];
[self.navigationController presentViewController:picker animated:YES completion:nil];