flutter_emailer 0.0.4 copy "flutter_emailer: ^0.0.4" to clipboard
flutter_emailer: ^0.0.4 copied to clipboard

This plugin in to open mail and send mail with different cases

Flutter Emailer Plugin #

A Flutter plugin for opening email applications and sending emails with various use cases.


Features #

The plugin supports the following functionalities:

  • Open the default email application.
  • Send emails to single or multiple recipients.
  • Include CC and BCC recipients.
  • Add a subject or body to the email.

Available Methods #

  1. Open email application:
    openEmailApp()

  2. Single receiver without subject:
    openEmailWithForSingleReceiverOnly(String receiverEmailId, List<String>? cc, List<String>? bcc)

  3. Multiple receivers without subject:
    openEmailWithForMultipleReceiverOnly(List<String> receiverEmailIdList, List<String>? cc, List<String>? bcc)

  4. Single receiver with subject:
    openEmailWithForSingleReceiverWithSubject(String receiverEmailId, String subject, List<String>? cc, List<String>? bcc)

  5. Multiple receivers with subject:
    openEmailWithForMultipleReceiverWithSubject(List<String> receiverEmailIdList, String subject, List<String>? cc, List<String>? bcc)

  6. Email with body only:
    openEmailWithBodyOnly(String body, List<String>? cc, List<String>? bcc)


Permissions #

Android #

  1. Add the following permissions to your AndroidManifest.xml file:
<queries>
<intent>    
    <action android:name="android.intent.action.SENDTO" />    
    <data android:scheme="mailto" />
</intent>
</queries>

Ios #

  1. Add the following permissions to your info.plist file:
<dict>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>mailto</string>
</array>
</dict>

Implementation #

  1. To use this package, add the package to your pubspec.yaml file:
dependencies:
flutter_emailer: ^0.0.1
  1. Import the package:
import 'package:flutter_emailer/flutter_emailer.dart';
  1. Usage:
void _openEmailWithSubject() async {
  try {
    await FlutterEmailer.openEmailWithForSingleReceiverWithSubject('receiverEmail@gmail.com',"Test Subject");
  } catch (e) {
    debugPrint('Error: $e');
  }
}

Developed by:
Ruchita Bhaskar
Personal email - ruchita.bhaskar@gmail.com
Work email - ruchitab@fermion.in
LinkedIn - https://www.linkedin.com/in/ruchita-bhaskar-823488180
Publisher's LinkedIn - https://www.linkedin.com/company/fermioninfotech?trk=profile-position

3
likes
150
points
32
downloads

Publisher

verified publisherfermioninfotech.com

Weekly Downloads

This plugin in to open mail and send mail with different cases

Homepage

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, plugin_platform_interface, url_launcher

More

Packages that depend on flutter_emailer