如何在MFMailComposeViewController中设置? [英] How to set from in MFMailComposeViewController?

查看:109
本文介绍了如何在MFMailComposeViewController中设置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何设置 MFMailComposeViewController中的起始地址

MFMailComposeViewController *controller = [[MFMailComposeViewController alloc] init];
controller.mailComposeDelegate = self;
[controller setSubject:@"In app email..."];
[controller setMessageBody:@"To FirstName LastName: " isHTML:NO];

// Set up recipients
NSArray *toRecipients = [NSArray arrayWithObject:@"eamil@somemail.com"]; // (NSString *) [feed valueForKey:@"email"]]; 
[controller setToRecipients:toRecipients];


推荐答案

没有办法做你想做的事使用From字段。来自地址将默认为用户在设置中指定为默认的任何邮件帐户。显然,如果用户只设置了一个邮件帐户,那么它就是该帐户。

There isn't a way to do what you want with the From field. The from address will default to whatever mail account the user has specified as "default" in Settings. Obviously if the user has only one mail account set up then it will be that account.

这篇关于如何在MFMailComposeViewController中设置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆