MFMailComposeViewController,带有收件人显示名称和电子邮件地址 [英] MFMailComposeViewController with recipient display-name as well as email address

查看:191
本文介绍了MFMailComposeViewController,带有收件人显示名称和电子邮件地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现我可以

[picker setToRecipients:[NSArray arrayWithObject:@"My Name <myname@example.com>"]];

并且在编写电子邮件时很好地在收件人:字段中显示我的姓名,并将其发送给正确到myname@example.com,在我的iPad设备上。在iPad模拟器中看起来也不错(当然不能发送)。

and it nicely displays "My Name" in the To: field when composing the email, and delivers it correctly to myname@example.com, on my iPad device. Looks good in the iPad simulator too (can't send though of course).

iPhone 模拟器只显示1个收件人撰写屏幕。不知道它是否会发送好,没有iPhone设备方便测试。

But the iPhone simulator just shows "1 recipient" on the compose screen. Don't know whether it would send it ok or not, don't have an iPhone device handy to test that.

有没有其他人走这条路?在iPhone撰写屏幕上获取显示名称的任何方法?

Has anyone else gone down this path? Any way of getting the display-name on the iPhone compose screen?

谢谢

推荐答案

好的。显示名称限制为40个字符。当我想出这个并用google搜索email display-name 40时,我发现其他(非Apple)引用了40个字符的限制。 RFC可能。也许我应该在我的问题中包含真实的显示名称和电子邮件地址;)

OK got it. There is a 40-character limit on the display name. When I figured this out and googled "email display-name 40" I find there other (non-Apple) references to a 40-char limit. RFC possibly. Perhaps I should have included the real display-name and email address in my question ;)

这篇关于MFMailComposeViewController,带有收件人显示名称和电子邮件地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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