flutter_mailer
flutter_mailer copied to clipboard
iOS only mail app is used even though gmail is installed and configured on device
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?
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.
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?
@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 +.
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.