flutter_mailer icon indicating copy to clipboard operation
flutter_mailer copied to clipboard

supports web ?

Open flowcharterappowner opened this issue 5 years ago • 3 comments

flowcharterappowner avatar Apr 28 '20 05:04 flowcharterappowner

short answer: no but might be.

all thought it is possible to open an email intent throught the browser with a mailto: link. using url_launcher stackoverflow.

some thing like

import 'package:url_launcher/url_launcher.dart';


final String mailtoUrl = 'mailto:$email?subject=$_subject&body=$_body';

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

it is not possible to add attachments from my understanding.

it might also be possible to send an email using the browsers share API Share like a native app with the Web Share API, but i have not tried that.

a PR is always appreciated.

taljacobson avatar Apr 28 '20 09:04 taljacobson

Pub.dev is showing that it works

image

GustavoContreiras avatar Apr 29 '20 14:04 GustavoContreiras

The master version is using the old pubspec plug-in config. If you press on the 5.0.0-dev link on the top it will show that it is not.

Either way the plug-in should not crash in a web env but will do nothing, or throw a not implement error.

On Wed, Apr 29, 2020, 5:26 PM Gustavo Contreiras [email protected] wrote:

Pub.dev is showing that it works

[image: image] https://user-images.githubusercontent.com/38460351/80607733-39ab7500-8a0c-11ea-94b6-624a42134969.png

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/taljacobson/flutter_mailer/issues/24#issuecomment-621246117, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADDQIUNVDHWD6XCOR7DEWFDRPA2JNANCNFSM4MSQH27Q .

taljacobson avatar Apr 29 '20 15:04 taljacobson