开发者

Check to see if email is enabled?

I'm working on an iPhone app that, at a certain point, will try to send an email message. If the user has an email set up, great, if not, I need to change some actions accordingly. My question is how do I check to see if t开发者_开发百科he user's iPhone has an email account setup? I've looked everywhere but I can't seem to find an answer.

I'm using MFMailViewController to send the message, but I don't want to create an instance of it unless I can actually send something. Any ideas?


MFMailComposeViewController class has +canSendMail method which

Returns a Boolean indicating whether the current device is able to send email. (YES if the device is configured for sending email or NO if it is not.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜