スキップしてメイン コンテンツに移動

sendmailをgmail経由で送信する設定

 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が使えるようになる。


以上です。

コメント

このブログの人気の投稿

gitよく使うコマンド集

よく使うgitのコマンド集をまとめてみた。 1.ローカルリポジトリの登録  #git init 2.gitの状態を確認  #git status 3.gitのファイルを追加  #git add . 4.ローカルのマスタにコミットする  #git commit -m "体温管理アプリの初期化" 5.リモートリポジトリを登録する  #git remote add origin https://github.com/ユーザーID/リポジトリ名  例)git remote add origin https://github.com/githubkyo/taionkanri 6. リモートリポジトリの変更履歴の取得 git fetch origin master 7.差分のあるファイル名を表示 > git diff --name-status ローカルブランチ名 origin/リモートブランチ名 【例】 > git diff --name-status master origin/master 8.リモートのファイルのみをローカルに反映する。 git checkout origin/master --src/Eccube/Resource/template/default/default_frame.twig 9.別ブランチをマスタへマージする git checkout master git merge other_branch 以上で、随時更新していく予定。

MongoDB入門編 その1)

mogoDBについて、勉強しながら、紹介していきます。 1.インストール  https://www.mongodb.com/try/download/communityにアクセスして、Available Downloadsの ところから、ダウンロードして、手順に沿ってインストールする。 2.サービスの起動と停止 起動:sudo service mongodb start 停止:sudo service mongodb stop 3.mongoシェルの起動 #mongo 4.実際に使ってみる。 ・用語  MongoDBとRDBとの比較  -------------------------------------  MongoDB          | RDB  -------------------------------------  データベース     | データベース  -------------------------------------  コレクション     | テーブル  -------------------------------------  ドキュメント     | 行(レコード)  -------------------------------------  フィールド       | 列  -------------------------------------   ・データベースの作成  >use study   switched to db study      これだけで、studyというデータベースができました。     > db.stats() {     "db" : "study",     "collections" : 0,     "objects" : 0,     "avgObjSize" : 0,     "dataSize" : 0,     "stora...