3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

gmailでメルマガを送る

Posted at

gmailは一日500件までSMTPでメール送信できる。
よって、その機能使ってcakephp3からメルマガを送ってみる。

今回は新規gmailアカウントを取得し、それをメルマガ送信専用とする。

今回取得した gmail アカウントは your@gmail.com とする。

maga@mydomain.comのメアドを作成
・上記の転送先を your@gmail.com に指定

・アプリのセキュリティを緩める
https://www.google.com/settings/security/lesssecureapps

オンにするを選択

・重要 上記じゃまだログインできないので (SMTP server did not accept the password. エラーが出るので。)

https://support.google.com/accounts/answer/6009563
にある
https://accounts.google.com/DisplayUnlockCaptcha

をクリック。

これで送信できるようになる。

gmailを追加してみる

gmailにログイン、> アカウントとインポート > 他のメールアドレスを追加

の順に。

TLS送信で、
SMTPサーバー smtp.gmail.com
ユーザー名 your@gmail.com
パスワード gmailpassword

これで、届いたコードを入力すれば gmail からも送受信できる。

あとは普通に送信するだけ。簡単ですね。

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?