WWDC23 SALE: Save 50% on all my Swift books and bundles! >>

Sending an email from an app

Forums > SwiftUI

Hi there, i'd like the user to send an eamil from the app and I found this nice package on Github and it works as long as mail.app is installed.


What is mail.app is not installed, is it possible to send an email from the app in those circumstances?

Thank you!


Depends on if the user sends the email or you as developer. If the Mail.app isn't installed you need somehow mail server data and credentials.

Many email providers offer besides IMAP also smtp. You can search for it for your email provider. But as I said, the user has to enter the settings in your app.


Hi @flaneur7508

I think you will find that it to do with if the device has the Mail app. So this will not work on the simulator as it does not have a Mail app but should work on real device.


Try using a mailto: URL. That should use the user's default mail app, regardless of whether it is the built-in Mail.app or something else.


thanks guys. @roosterboy I will check that but I dont hold out much hope. cheers! @Nigelgee, yep I discovered that pretty quickly :) all the best folks!


Save 50% in my WWDC23 sale.

SAVE 50% To celebrate WWDC23, all our books and bundles are half price, so you can take your Swift knowledge further without spending big! Get the Swift Power Pack to build your iOS career faster, get the Swift Platform Pack to builds apps for macOS, watchOS, and beyond, or get the Swift Plus Pack to learn advanced design patterns, testing skills, and more.

Save 50% on all our books and bundles!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

Unknown user

You are not logged in

Log in or create account

Link copied to your pasteboard.