BLACK FRIDAY: 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.

https://github.com/globulus/swiftui-mail-view

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

Thank you!

1      

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.

1      

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.

1      

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.

1      

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!

1      

Save 50% in my WWDC sale.

SAVE 50% All our books and bundles are half price for Black Friday, 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!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

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.