Sending mail from Flutter Web. Trying to send email with security code to recipient email input in the TextFormField.
import 'package:flutter_email_sender/flutter_email_sender.dart';
final Email email = Email(
body: _bodyController.text,
subject: _subjectController.text,
recipients: [_recipientController.text],
attachmentPaths: attachments,
isHTML: isHTML,
);
String platformResponse;
try {
await FlutterEmailSender.send(email);
platformResponse = 'success';
} catch (error) {
platformResponse = error.toString();
}
if (!mounted) return;
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(platformResponse),
),
);
pubspec.yaml
flutter_email_sender: ^5.0.2
The error got:
MissingPluginException(No implementation found for method send on channel flutter_email_sender)
The problem remains the same after Invalidate Caches/Restart. Does anyone know how to solve to this problem? Thanks!
Rebuild it instead of hot restart/hot reload
Currently the flutter_email_sender
plugin is not supported for the web platform.
The displayed error message MissingPluginException(No implementation found for method send on channel flutter_email_sender)
indicates that.
All packages available in pub.dev have some tags that indicates the supported platforms.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With