How to send S/MIME encrypted mails from iOS with attachment?

816 views Asked by At

How can I programmatically send an e-mail that is encrypted and signed using S/MIME?

How I currently do it:

  • Prepare MFMailComposer
  • Save the mail as a draft
  • Switch to native mail app
  • Open said draft
  • Send draft (which is automatically encrypted/signed by opening it directly from the mail app)

This seems unproductive.

Why I want MFMailComposer: If internet is unavailable, mail will be put in the outbox and sent automatically as soon as internet is available. If there is a solution to my S/MIME problem that doesn't rely on MFMailComposer, it has to have this "automatic-send"-feature.

1

There are 1 answers

2
BechD On

Apple does not allow you to sent emails without MFMailComposer (because it would be easy to abuse). The only way I can think of is to send your email to your sever and and encrypt it there/send it. You can always check if there is no intenet connection and write the contents of the email to a temp file and send it when internet is available.

Hope this helps. Regards.