Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS only mail app is used even though gmail is installed and configured on device #29

Open
keehoo opened this issue Jun 26, 2020 · 4 comments
Labels

Comments

@keehoo
Copy link

keehoo commented Jun 26, 2020

Hi, the library works fine on Android, but for iOS it only uses stock Mail app even though Gmail is installed. Any comment on this functionality? Anyone also experiencing this?

@taljacobson
Copy link
Owner

on ios it uses mfmailcomposeviewcontroller which opens the stock ios mail app.
i believe there is way no to change which app gets open, although it seems things might change with ios 14 third-party-default-apps-ios-14, but i cant find how exactly it will work..

a way to open gmail through ios is to use a gmail scheme and open it with url_launcher

import 'package:url_launcher/url_launcher.dart';


final String gmailUrl =  'googlemail://co?subject=$subject&body=$body&to=$email';


if (await canLaunch(gmailUrl)) {
    await launch(gmailUrl);
 }

keep in mind that it does not have html or attachments support.

@TheGlorySaint
Copy link

TheGlorySaint commented Oct 19, 2020

Since iOS 14 is now out, you can choose the default Mail App.

Will Mailer be updated so it is opening the default Mail App when there is another selectend then the Stock iOS Mail App?

So adding maybe a openDefaultMailApp Function?

@DieGlueckswurst
Copy link

@taljacobson I have the same issue. I need to use Email Sender because I attache a file. But EmailSender is not working with another app than the default iOS app. Is there any way to open the selected default app? (Spark in my case)

URL Launcher and SharePlus Packages are working as expected with opening the selected default app on iOS 14 +.

@taljacobson
Copy link
Owner

been awhile since i researched the subject, but unfortunately don't believe its possible to open a different(not the default ios mail app) email client and attach files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants