Any good email library for Swift/iOS?


I’m intending to write an email client for iOS using Xcode and Swift. Does anybody have an idea what IMAP and SMTP library/libraries to use?

  • The MailCore and Postal libraries are both based on libetpan which doesn’t seem to be maintained anymore; currently it simply crashes on iOS 17.
  • swift-nio-imap seems to be official but it is extremely low-level.
  • I found this SMTP library but the developers don’t seem to offer an equivalent for IMAP.
  • Using libcurl seems like a good idea as it’s widely used, maintained and offers a simple yet powerful API for both IMAP and SMTP but how on earth do I use it in my Swift-written iOS app? This tutorial explains how to use a C library in Swift and it even uses libcurl as its example but it only works on macOS, I need it to work on iOS (cf. my previous question on Stack Overflow). Here someone talks about having compiled curl on iOS but provides no instructions or details whatsoever. The official curl site has instruction on compiling it for iOS but I have no idea on how to transfer that to my Swift app. I tried this official article on wrapping a C library in Swift but I’m struggling with that one as well, I’m currently getting a public headers ("include") directory path for 'CCurl' is invalid or not contained in the target error.
  • Is there any wail to use an Apple API and use the email accounts that the user already set up on his iPhone? Apple’s MailKit seems to be for rather restricted use cases.

Thanks!

Latest articles

spot_imgspot_img

Related articles

Leave a reply

Please enter your comment!
Please enter your name here

spot_imgspot_img