Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS: How to know if a mail account exist

Tags:

email

ios

account

For my app, I need to know if there's a mail account has soon as the app is launched. Is there a way to do that ?

I don't really know what canSendMail does but it does not seems to verify that.

Thanks

like image 217
little Avatar asked Aug 07 '11 17:08

little


People also ask

Why does Mail say my account already exists?

Last Updated: May 10, 2022 When adding a mailbox to Outlook for Mac, you might encounter the error “Account already exists”. This error occurs because you've tried to add a shared mailbox through the main “Add email account” window. Close the error window and return to the main Accounts window.

How do I remove an email from my Apple ID?

Delete an additional email addressSign in to appleid.apple.com. Select Personal Information, then select Reachable At. To delete one of your additional email addresses, click the Remove button next to it.

Does iOS have an email?

Apple Mail It comes built into every iPhone, and it supports just about any account type you'd like. It's easy to start new messages.


1 Answers

canSendMail is actually the right and only way to verify what you want.

if ([MFMailComposeViewController canSendMail]) {
    // device is configured to send mail
}
like image 187
Filip Radelic Avatar answered Oct 05 '22 06:10

Filip Radelic