サブミッションポート環境下でのメール設定 for mantis
自宅は、プロバイダが25番ポートを規制している為、簡単には
メールを送信することが出来ません。
なので、サブミッションポートを使いメールを送信してます。
ということは、XAMPPでメールを送信しようと思っても簡単にはいかず・・・
以下の設定が必要になります。
まず、config_default_inc.phpです
phpのmail()関数を利用して送信するようにします。
# select the method to mail by: # 0 - mail() # 1 - sendmail # 2 - SMTP $g_phpMailer_method = 0; # This option allows you to use a remote SMTP host. Must use the phpMailer script # One or more hosts, separated by a semicolon, can be listed. # You can also specify a different port for each host by using this # format: [hostname:port] (e.g. "smtp1.example.com:25;smtp2.example.com"). # Hosts will be tried in order. $g_smtp_host = 'localhost'; # These options allow you to use SMTP Authentication when you use a remote # SMTP host with phpMailer. If smtp_username is not '' then the username # and password will be used when logging in to the SMTP server. $g_smtp_username = ''; $g_smtp_password = '';
次に、sendmail.iniの編集。
\xampp\xampp\sendmail\sendmail.ini
以下の項目を変更します。
smtp_server=smtpサーバー;ユーザーの環境に合わせて smtp_port=587 auth_username=ユーザーID;ユーザーの環境に合わせて auth_password=パスワード;ユーザーの環境に合わせて
最後に、php.iniの編集
[mail function]のセクションを以下のように修正。
[mail function] ; For Win32 only. SMTP = localhost smtp_port = 587 ; For Win32 only. sendmail_from = 送信元; (メールアドレス書いて下さい) ; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). sendmail_path = "F:\xampp\xampp\sendmail\sendmail.exe -t" ; 最初コメントになっているので外しておきます。
こうやって設定した後、apacheを再起動してやれば、
メールが送れるはず!!