###前提・実現したいこと
OpenPNEでSNSを作っています。
環境
OS Windows10
XAMPP使用
ルートディレクトリ C:\xampp\htdocs
OpenPNEディレクトリ C:\xampp\htdocs\openpne
LocalhostのURL http://localhost/openpne/web/
###発生している問題・エラーメッセージ
招待メールを送信しようとしたときに
メールの送信に失敗しました。もう一度実行するか管理者に連絡して下さい。
と表示される。
C:\xampp\htdocs\openpne\web
のindex.phpを
php
1 $configuration = ProjectConfiguration::getApplicationConfiguration('mobile_frontend', 'dev', false); 2} 3else 4{ 5 $configuration = ProjectConfiguration::getApplicationConfiguration('pc_frontend', 'dev', false);
に変更してログを取得すると
182 Error sfOther Mail Send Error: 5.7.8 Username and Password not accepted. Learn more at 5.7.8 https://support.google.com/mail/?p=BadCredentials s2sm35571008pfi.10 - gsmtp Toggle debug stack #18 » in opExecutionFilter->handleAction() from SF_ROOT_DIR\cache\apache2handler\pc_frontend\dev\config\config_core_compile.yml.php line 933 #17 » in sfExecutionFilter->execute() from SF_ROOT_DIR\cache\apache2handler\pc_frontend\dev\config\config_core_compile.yml.php line 1031 #16 » in sfFilterChain->execute() from SF_ROOT_DIR\lib\filter\opEmojiFilter.class.php line 29 #15 » in opEmojiFilter->execute() from SF_ROOT_DIR\cache\apache2handler\pc_frontend\dev\config\config_core_compile.yml.php line 1031 #14 » in sfFilterChain->execute() from SF_ROOT_DIR\lib\vendor\symfony\lib\filter\sfBasicSecurityFilter.class.php line 72 #13 » in sfBasicSecurityFilter->execute() from SF_ROOT_DIR\cache\apache2handler\pc_frontend\dev\config\config_core_compile.yml.php line 1031 #12 » in sfFilterChain->execute() from SF_ROOT_DIR\lib\filter\opAppendXRDSHeaderFilter.class.php line 26 #11 » in opAppendXRDSHeaderFilter->execute() from SF_ROOT_DIR\cache\apache2handler\pc_frontend\dev\config\config_core_compile.yml.php line 1031 #10 » in sfFilterChain->execute() from SF_ROOT_DIR\lib\filter\opCheckEnabledApplicationFilter.class.php line 39 #9 » in opCheckEnabledApplicationFilter->execute() from SF_ROOT_DIR\cache\apache2handler\pc_frontend\dev\config\config_core_compile.yml.php line 1031 #8 » in sfFilterChain->execute() from SF_ROOT_DIR\lib\filter\opCacheControlFilter.class.php line 27 #7 » in opCacheControlFilter->execute() from SF_ROOT_DIR\cache\apache2handler\pc_frontend\dev\config\config_core_compile.yml.php line 1031 #6 » in sfFilterChain->execute() from SF_ROOT_DIR\cache\apache2handler\pc_frontend\dev\config\config_core_compile.yml.php line 995 #5 » in sfRenderingFilter->execute() from SF_ROOT_DIR\cache\apache2handler\pc_frontend\dev\config\config_core_compile.yml.php line 1031 #4 » in sfFilterChain->execute() from SF_ROOT_DIR\cache\apache2handler\pc_frontend\dev\config\config_core_compile.yml.php line 665 #3 » in sfController->forward() from SF_ROOT_DIR\cache\apache2handler\pc_frontend\dev\config\config_core_compile.yml.php line 2352 #2 » in sfFrontWebController->dispatch() from SF_ROOT_DIR\lib\vendor\symfony\lib\util\sfContext.class.php line 170 #1 » in sfContext->dispatch() from SF_ROOT_DIR\web\index.php line 35
と表示される。
メールの送信はSMTPで、smtp.gmail.comを経由している。
OpenPNE.ymlの設定は
base_url: "http://localhost/openpne/web/" ###################################### # メール (Mail) ###################################### # SNS からのメール送信に使うドメイン # Domain to use for sending e-mail from the SNS mail_domain: "gmail.com" # メール投稿アドレスにメンバー毎にユニークなハッシュを含める # Contain an individual hash for an e-mail address that is used to post something to the SNS is_mail_address_contain_hash: true # メール投稿アドレスのハッシュの長さ # Length of hash for an e-mail address for posting mail_address_hash_length: 12 # SNS から送信するメールの Envelope From (Return-Path ヘッダ) に指定するアドレス (PHP の safe_mode が有効な環境では指定できません) # Envelope From (Return-Path header) address for sending e-mail from the SNS (cannot use if your PHP's safe_mode setting is on) #mail_envelope_from: "return@gmail.com" # SNS から SMTP 経由でメールを送信する場合の SMTP サーバのホスト名 # Hostname of the SMTP server for sending e-mail via SMTP mail_smtp_host: "smtp.gmail.com" # SNS から SMTP 経由でメールを送信する場合の SMTP の設定 # Config of the SMTP for sending e-mail via SMTP mail_smtp_config: auth: "login" username: "*****@gmail.com" #gmailアドレス password: "************" #12桁のアプリパスワード 設定はWindowsのメール。 ssl: "TLS" port: 587 # メールテンプレートに機能制限をおこなうかどうか # Add restriction to mail templates is_restrict_mail_template: true
で、設定している。
これ以外にメールの設定を行ったものはないので
設定が必要なファイル、修正すべきファイルをご教授願いたい。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/12/21 06:45