Iphone 应用程序ondevice方法的邮件生成器问题
我使用这个代码来发送邮件 MFMailComposeViewController*选择器=[[MFMailComposeViewController alloc]init] picker.mailComposeDelegate=self NSString*msgTitle=@“示例标题” NSArray*toRecipients=[[NSArray alloc]init] NSArray*ccRecipients=[[NSArray alloc]init] NSArray*bccreciients=[[NSArray alloc]init] [picker setToRecipients:toRecipients]Iphone 应用程序ondevice方法的邮件生成器问题,iphone,objective-c,Iphone,Objective C,我使用这个代码来发送邮件 MFMailComposeViewController*选择器=[[MFMailComposeViewController alloc]init] picker.mailComposeDelegate=self NSString*msgTitle=@“示例标题” NSArray*toRecipients=[[NSArray alloc]init] NSArray*ccRecipients=[[NSArray alloc]init] NSArray*bccreciient
NSString *sum = @"The Email Body string is here";
[选择器设置ccRecipients:ccRecipients]
[选取者/接收者:b委托人]
NSString *sum = @"The Email Body string is here";
NSString*电子邮件正文
emailBody=[NSString stringWithFormat:@“%@”,总和]
[picker setMessageBody:emailBody isHTML:YES]
[自我呈现ModalviewController:picker动画:是]
[选择器释放]
它起作用了
我想知道,是否需要修改
-(无效)启动MailAppondevice
{
NSString*收件人=@“邮件收件人:first@example.com?抄送=second@example.com,third@example.com&主题=你好,来自加利福尼亚!”;
NSString*body=@“&body=阳光明媚的加利福尼亚正在下雨!”
NSString*电子邮件=[NSString stringWithFormat:@“%@%@”,收件人,正文];
email=[email stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]
[[UIApplication sharedApplication]openURL:[NSURL URLWithString:email]];
}
如果是,那么
如何在这个方法中修改
请帮帮我 如果电子邮件地址以静态方式给出并显示在收件人地址中 你可以使用这个代码
MFMailComposeViewController *mail = [[MFMailComposeViewController alloc] init];
mail.mailComposeDelegate = self;
if ([MFMailComposeViewController canSendMail]) {
[mail setToRecipients:[NSArray arrayWithObjects:@"AAA@BBB.com",nil]];
[self presentModalViewController:mail animated:YES];
}
[mail release];
及
祝你好运