पैकेज, रिपॉज़िटरी और ऐप श्रेणियाँ खोजें

पैकेज विवरणv3.0.3

flutter_mailer

उपकरण पर ईमेल साझा करें ईमेल - क्लाइंट मल्टीपल एटैचमेंट्स का समर्थन करता है

AndroidiOS
30-दिन डाउनलोड
28.5 हज़ार
लाइक
92
Pub अंक
160

पैकेज इंस्टॉल करें

flutter pub add flutter_mailer

पैकेज अवलोकन

सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।

Flutter Mailer एक Flutter पैकेज है जो उपयोगकर्ताओं को अपने ऐप से डिवाइस के डिफ़ॉल्ट ईमेल क्लाइंट में ईमेल साझा करने की अनुमति देता है। यह बहुत से अटैचमेंट के साथ ईमेल भेजने का समर्थन करता है, जिससे डॉक्यूमेंट्स, छवियों या अन्य फ़ाइलों को साझा करना आसान हो जाता है। यह पैकेज Android और iOS प्लेटफ़ॉर्म के साथ बिना किसी दिक्कत के एकीकृत होता है, नेटिव ईमेल इंटेंट का उपयोग करके सुनिश्चित करता है कि यह संगतता और विश्वसनीयता हो। यह निर्धारित प्राप्तकर्ता, विषय, शरीर और अटैचमेंट के साथ ईमेल संचार छेद को शुरू करने की प्रक्रिया को सरल बनाता है।

उपयोग

  • एप्लिकेशन के भीतर दस्तावेज़ साझा करना
  • सहायता टिकट के साथ अटैचमेंट भेजें
  • रिपोर्ट या रसीद का वितरण
  • ईमेल के माध्यम से उपयोगकर्ता प्रतिक्रिया सक्षम करना
  • एप्लिकेशन में ईमेल कार्यवाहकों को स्वचालित करना

मुख्य विशेषताएँ

  • कई फ़ाइल संलग्न करने का समर्थन करता है
  • Android और iOS पर मूल ईमेल क्लाइंट का उपयोग करता है
  • ईमेल संरचना के लिए सरल API
  • प्लेटफॉर्म के अनुकूलता
  • कॉन्फ़िगरेबल ईमेल फ़ील्ड्स (टू, विषय, शरीर)

इनके लिए उपयुक्त

  • ईमेल साझाकरण कार्यक्षमता की आवश्यकता वाले ऐप्स
  • दस्तावेज़-आधारित एप्लिकेशन
  • ग्राहक समर्थन एकीकरण
  • रिपोर्टिंग या विश्लेषण उपकरण
  • उपयोगकर्ता-उत्पादित सामग्री वितरण

विचार योग्य बातें

  • उपयोगकर्ता के डिफ़ॉल्ट ईमेल क्लाइंट पर निर्भर करता है
  • उपयोगकर्ता के बाद कोई सीधा ईमेल भेजने के बिना
  • संलग्न फ़ाइल के आकार सीमा उपकरण और ओएस पर निर्भर करती है
  • कुछ डिवाइस पर सही अनुमतियां आवश्यक हैं
  • ईमेल संरचना प्लेटफॉर्म के आधार पर थोड़ी अलग हो सकती है

मूल README

संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।

flutter_mailer

pub package

Share email content via device Email Client - supports multiple Attachments

Simple & quick plugin for cross application data sharing of email fields in mobile development.

Flutter Mailer example app

Supports:

  • [x] android
  • [x] ios

Getting Started

Add to your pubspec dependencies, like so:

dependencies:
  flutter:
    sdk: flutter
  flutter_mailer: ^3.0.0

Instantiate mail options as follows:

send email
import 'package:flutter_mailer/flutter_mailer.dart';

...
...

final MailOptions mailOptions = MailOptions(
  body: 'a long body for the email <br> with a subset of HTML',
  subject: 'the Email Subject',
  recipients: ['example@example.com'],
  isHTML: true,
  bccRecipients: ['other@example.com'],
  ccRecipients: ['third@example.com'],
  attachments: [ 'path/to/image.png', ],
);

final MailerResponse response = await FlutterMailer.send(mailOptions);
switch (response) {
  case MailerResponse.saved: /// ios only
    platformResponse = 'mail was saved to draft';
    break;
  case MailerResponse.sent: /// ios only
    platformResponse = 'mail was sent';
    break;
  case MailerResponse.cancelled: /// ios only
    platformResponse = 'mail was cancelled';
    break;
  case MailerResponse.android:
    platformResponse = 'intent was successful';
    break;
  default:
    platformResponse = 'unknown';
    break;
}

note gmail and other apps Might parse HTML out of the body.

[Android] check if app is installed.

use full if you want to send the intent to a specific App. returns false on [IOS]

const GMAIL_SCHEMA = 'com.google.android.gm';

final bool gmailinstalled =  await FlutterMailer.isAppInstalled(GMAIL_SCHEMA);

if(gmailinstalled) {
  final MailOptions mailOptions = MailOptions(
    body: 'a long body for the email <br> with a subset of HTML',
    subject: 'the Email Subject',
    recipients: ['example@example.com'],
    isHTML: true,
    bccRecipients: ['other@example.com'],
    ccRecipients: ['third@example.com'],
    attachments: [ 'path/to/image.png', ],
    appSchema: GMAIL_SCHEMA,
  );
  await FlutterMailer.send(mailOptions);
}

[IOS] check if device has the ability to send email

this package uses MFMailComposeViewController for [IOS] which requires the default mail App. if none is installed you might want to revert to use url_launcher returns false on [Android]


  final bool canSend = await FlutterMailer.canSendMail();

  if(!canSend && Platform.isIos) {
    final url = 'mailto:$recipient?body=$body&subject=$subject';
    if (await canLaunch(url)) {
      await launch(url);
    } else {
      throw 'Could not launch $url';
    }
  }
}

For help getting started with Flutter, view official online documentation.

For help on editing plugin code, view the documentation.

based off of react-native-mail

श्रेणियाँ

सोर्स रिपॉज़िटरी

इस पैकेज का उपयोग करने वाले प्रोजेक्ट