How do you open the default email app on an iPhone

2019-06-22 13:51发布

问题:

I want to make a Flutter app and one of the requirements is to open the native email client on the Android or iPhone device. I do NOT wish to create a new email, just open the email app. I would like to be able to open the email client with platform generic code if possible, if not I would like to know what would be required on the iOS side. I am not looking for the Send Email Intent, as I know there is a plugin in Flutter for that. Being a Android Developer I believe I know how to call an Intent from Flutter for that Implicit Intent, if I have to go that way, but I don't have the familiarity with iOS.

回答1:

The url_launcher plugin does that

mailto:<email address>?subject=<subject>&body=<body>

Create email to in the default email app

See also How do I open a web browser (URL) from my Flutter code?