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