IOS: how to find out if a mail account exists

For my application, I need to know if there is an email account soon after launching the application. Is there any way to do this?

I really don't know what canSendMail does, but it doesn't seem to check.

thanks

+6
source share
2 answers

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

if ([MFMailComposeViewController canSendMail]) { // device is configured to send mail } 
+28
source

For those looking for a Xamarin solution, it is available as a static property, so you can do it something like this:

 MFMailComposeViewController.CanSendMail 
0
source

Source: https://habr.com/ru/post/894491/


All Articles