title: MFMailComposeViewController canSendMail returns false if the email account was added via a profile (like MDM)
body: <p>a customer reported an error that a lot of users could not send email because they only got an alert that there is no email account.
  The alert is done in code if <code>MFMailComposeViewController</code> returns <code>false</code> from <code>canSendMail</code>.</p>
  
  <p>We had difficulty finding out what the real problem was, but after some testing we found out, that <code>canSendMail</code> always returns <code>false</code> when the only email account available is setup via a profile (possibly MDM or something like the Apple Configurator).</p>
  
  <p>The configured email has no problem receiving and sending emails in Mail itself and when it is added manually without a profile, it works as expected.</p>
  
  <p>Has anyone any suggestion or a possible workaround? Maybe it is just a misconfiguration?
  <a href="https://i.stack.imgur.com/0lVKx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0lVKx.png" alt="enter image description here"></a></p>