「Flutter/外部ライブラリ/メール送信/flutter mailer」の版間の差分
提供: 初心者エンジニアの簡易メモ
| 行1: | 行1: | ||
==flutter_mailerとは== | ==flutter_mailerとは== | ||
| + | 直でflutterからメール送信できるライブラリ | ||
==公式== | ==公式== | ||
2019年12月5日 (木) 14:42時点における版
flutter_mailerとは
直でflutterからメール送信できるライブラリ
公式
https://pub.dev/packages/flutter_mailer
インストール
dependencies: flutter_mailer: ^0.4.1+1
サンプル
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', ],
);
await FlutterMailer.send(mailOptions);
