CurlでGmail API使ってメールを送信しようとしたらアプリパスワードの作成が必要だった件

linux - Using curl to send email - Stack Overflow

curl --url 'smtps://smtp.gmail.com:465' --ssl-reqd \
  --mail-from 'username@gmail.com' --mail-rcpt 'john@example.com' \
  --upload-file mail.txt --user 'username@gmail.com:password' --insecure

mail.txt file contents:

From: "User Name" <username@gmail.com>
To: "John Smith" <john@example.com>
Subject: This is a test

Hi John,
I’m sending this mail with curl thru my gmail account.
Bye!

Curlで送信しようしたけど、アプリパスワードを設定してないとlogin deniedした。 アプリパスワードをpasswordに入力したら通った。やったぜ。

近い

メールを送ろう。curlで。 - Blanktar

Linux: curl で Gmail の SMTP を利用してメールを送信する - Sarabande.jp

curlコマンドでgmail送信 | PaPeRo i [非公式] Developer Forum

二段階認証の件

メーラーからGmailへの接続時に認証(パスワード)のエラーが生じる場合の対処方法 (1/2):Tech TIPS - @IT

Sign in using App Passwords - Google Account Help

ASCII.jp:メールを送る際に使われるSMTPの仕組みとは?

その他

他のメール プラットフォームで Gmail のメールをチェックする - Gmail ヘルプ

c - sending an email with libcurl/smtp with gmail: login denied - Stack Overflow

Users.drafts: send  |  Gmail API  |  Google Developers

Sending Email  |  Gmail API  |  Google Developers

トランザクションメールを送信する - ドキュメント | SendGrid

API Reference  |  Gmail API  |  Google Developers

Gmail APIを使ってサービス運用に応用してみる | GRIPHONE ENGINEER'S BLOG

Linux command to use gmail API - Stack Overflow

その他 Python

Python Gmail APIでCSV付きメール送信 - Qiita

GitHub - googleapis/google-api-python-client: 🐍 The official Python client library for Google's discovery based APIs.

pipのインストール方法 - Qiita

pipが使えなくてこれは×

その他 Go

go言語でバージョンを表示する | monkey404

go version

goが使えなくてこれは×

その他 Ruby gem

Ruby Quickstart  |  Gmail API  |  Google Developers

gemも使えなくてこれも×