4 Replies
      Latest reply: Feb 9, 2017 9:57 AM by pdm RSS
      Bagellord Level 1 Level 1 (0 points)

        This is a strange issue. I have an application that creates an email for the user to send. Everything appears to work, except that one of my users is reporting he can't get it to send. It displays my "no accounts configured blah blah blah" error. Which is strange because from what I can tell, he does have a valid email account set up that he can send from on the phone. He's not particularly tech savvy, so I am going to be working with his IT group later to try and get some more details.

         

        Basically, my question is this: under what circumstances will mfmailcomposeviewcontroller cansendmail return false?

        • Re: mfmailcomposeviewcontroller cansendmail returning no?
          pdm Apple Staff Apple Staff (1,640 points)

          I've moved this question to the Cocoa Touch forum, since the API you're asking about is in iOS.  Is it possible that the account is a managed account?  If so, then I suspect that is why it's not being considered eligible for use with the mail compose controller. 

            • Re: mfmailcomposeviewcontroller cansendmail returning no?
              Bagellord Level 1 Level 1 (0 points)

              Thanks, I didn't realize I'd posted to the wrong place. I believe it is a managed account added via an MDM (Maas360 according to their IT guy). What's weird is that the IT guy (I had him and the user on speaker just now) was able to use the app without issue. Very strange.

              • Re: mfmailcomposeviewcontroller cansendmail returning no?
                Andreas B Level 1 Level 1 (0 points)

                Hi pdm,

                 

                I have the same problem and it definately has to do with a configuration profile via MDM or Apple Configurator.

                What I found is that if you setup an email account with a configuration profile the MFMailComposeViewController returns false from canSendMail if this email account is the only one on the device.

                The option to restrict the email to only the mail app, had no effect on that. It was present wether the option was checked or not.

                 

                I filed a bug with a sample project that illustrates that. The report id is 30443554