1.sendmail.iniで下記の設定を行う。 ------------------------------- smtp_server=smtp.gmail.com smtp_port=465 auth_username=youraccount@gmail.com auth_password=youraccountpassword force_sender=youraccount@gmail.com ------------------------------- 2.gmailでの設定 https://myaccount.google.com/securityへアクセスし、 安全性の低いアプリのアクセス 「オフ―」から「オン」に変える。 3.php.iniでsendmail_pathを設定する。 [mail function] ; For Win32 only. ; http://php.net/smtp ;SMTP = localhost ; http://php.net/smtp-port smtp_port = 465 ; For Win32 only. ; http://php.net/sendmail-from ;sendmail_from ="admin@wampserver.invalid" ; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). ; http://php.net/sendmail-path sendmail_path = "sendmailフォルダーのパス\sendmail.exe -t" 4.Apacheを再起動すれば、sendmailが使えるようになる。 以上です。
ゼロベースからのプログラム技術をはじめ、アプリの開発、システムの構築までの幅広い情報を発信していきます。