【问题标题】:How to let user send feedback through their default Email app如何让用户通过他们的默认电子邮件应用程序发送反馈
【发布时间】:2019-11-26 13:17:44
【问题描述】:

我想让我的用户通过他们的默认电子邮件应用发送反馈。 例如,用户按下“发送反馈”按钮,它会打开他们的默认电子邮件应用程序,其中已输入收件人电子邮件 ID。在这种情况下,收件人是我们的反馈电子邮件地址。

【问题讨论】:

    标签: email flutter


    【解决方案1】:

    试试这个https://pub.dev/packages/flutter_email_sender

    允许使用原生平台功能从 Flutter 发送电子邮件。

    在 android 中,它通过意图打开默认邮件应用程序。本插件使用了compileSdkVersion 28,应用中也应该使用。

    在 iOS 中,MFMailComposeViewController 用于撰写电子邮件。

    例子

    final Email email = Email(
      body: 'Email body',
      subject: 'Email subject',
      recipients: ['example@example.com'],
      cc: ['cc@example.com'],
      bcc: ['bcc@example.com'],
      attachmentPath: '/path/to/attachment.zip',
    );
    
    await FlutterEmailSender.send(email);
    

    【讨论】:

      猜你喜欢
      • 2012-01-07
      • 1970-01-01
      • 1970-01-01
      • 2019-11-09
      • 2017-02-04
      • 1970-01-01
      • 2011-08-05
      • 2018-10-16
      • 2019-12-04
      相关资源
      最近更新 更多