首页 > 解决方案 > How to send mail inside app using Flutter

问题描述

I am trying to create a feedback page that allow users to submit issues. I tried using Mailer to send emails, not sure if that is the best solution. Wanted to get people's ideas?

标签: flutter

解决方案


您可以使用 url_launcher: https ://pub.dev/packages/url_launcher

它提供了一个很好的例子:

final Uri _emailLaunchUri = Uri(
  scheme: 'mailto',
  path: 'smith@example.com',
  queryParameters: {
    'subject': 'Example Subject & Symbols are allowed!'
  }
);

// ...

// mailto:smith@example.com?subject=Example+Subject+%26+Symbols+are+allowed%21
launch(_emailLaunchUri.toString());

这将启动电子邮件应用程序,并为您的用户输入您的数据。


推荐阅读