今回は、他のメール送信サーバ(Gmail)を利用しポート587番を利用してメールを送信する方法を案内します。
587番ポートを利用することで、スパムメールの配信が抑制でき、迷惑メールと判定されるケースを減らすことが可能です。
他のSMTPサーバの利用、587番ポートの設定をご検討ください。
※EC-CUBEバージョン 2.13.2の設定方法となります。
config.phpの設定変更箇所
web/【EC-CUBEインストール先フォルダ】/data/config/config.php
define('MAIL_BACKEND', 'smtp');
define('SMTP_HOST', 'smtp.gmail.com');
define('SMTP_PORT', '587');
define('SMTP_USER', '【メールアドレス】');
define('SMTP_PASSWORD', '【メールパスワード】');
smtp.phpの設定変更箇所
/web/【EC-CUBEインストール先フォルダ】/data/module/Mail/smtp.php
* The list of service extension parameters to pass to the Net_SMTP
* mailFrom() command.
* @var array
*/
var $_extparams = array();
/**
* The SMTP host to connect to.
* @var string
*/
var $host = 'smtp.gmail.com';
/**
* The port the SMTP server is on.
* @var integer
*/
var $port = 587;
/**
* Should SMTP authentication be used?
*
* This value may be set to true, false or the name of a specific
* authentication method.
*
* If the value is set to true, the Net_SMTP package will attempt to use
* the best authentication method advertised by the remote SMTP server.
*
* @var mixed
*/
var $auth = true;
/**
* The username to use if the SMTP server requires authentication.
* @var string
*/
var $username = '【メールアドレス】';
/**
* The password to use if the SMTP server requires authentication.
* @var string
*/
var $password = '【メールパスワード】';
Gmailアカウントをお持ちでない場合、ヘテムルのSMTPサーバを利用して送信することも可能です。SMTPホスト、メールアドレス、メールパスワードは下記URLメールアカウント情報からご確認ください。
メールソフトの設定方法
特定のメールサーバを利用してEC-CUBEからのメールを送信したい場合には、上記設定をご活用ください。