Firebase メール送信拡張機能でマルチパートメールを送信する

この記事を書いた人

@takasqr アプリケーション開発が大好きなエンジニア。Vue、Swift、Electrom などでアプリを作って公開している。AWS や Firebase などのクラウドサービスも好き。

作ったアプリKeyScript

気になったので試してみました。

以下のようにtexthtml両方に値を設定すると、自動的にマルチパートメールにメールヘッダーが設定されていました。

拡張機能が自動的に処理してくれているようです。

SendGrid で試しました。

to: ['someone@example.com'],
message: {
  subject: 'Hello from Firebase!',
  text: 'This is the plaintext section of the email body.',
  html: 'This is the <code>HTML</code> section of the email body.',
}

参考

Trigger Email 拡張機能の使用 | Firebase Extensions