flutter - 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?
解决方案
您可以使用 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());
这将启动电子邮件应用程序,并为您的用户输入您的数据。
推荐阅读
- php - PHP是否阻止了粘性位?
- php - php移动文件奇怪的bug
- python - pd.to_numeric 之后对象未转换为数字
- ionic-framework - 使用 ng-packagr 构建 Ionic 组件库
- javascript - 从 Axios 返回结果
- ethereum - 错误:数字最多只能安全存储 53 位
- liferay - Liferay DXP 的升级过程
- ms-word - 有人可以确认 macOS(Microsoft Word)上 Office.js 中的以下错误吗?
- python - 使用 Wagtail v2 和 Django v1.11 的路由错误
- fabricjs - 通过 HTML 编辑 FabricJS 对象