「GmailでのEメール設定」の版間の差分

提供:MoodleDocs
移動先:案内検索
編集の要約なし
(done ... need some brush up.)
18行目: 18行目:


=== class.smtp.php ===
=== class.smtp.php ===
Around line 83 DIRECTLY after the '''Connect''' function header, insert this line immediately after the "{" :
83行目あたり、'''Connect''' 関数のヘッダの後、"{" の後に次の行を挿入してください:
  $host = 'ssl://' . $host;
  $host = 'ssl://' . $host;


== Code Modification (1.9.2 or lower) ==  
== コード修正 (1.9.2以降) ==  
These two additional modifications need to be made in 1.9.2 or lower as the '''SMTP hosts''' setting above will not allow the port to be included.
上記の'''SMTP hosts'''設定でポートを含むことができないため、1.9.2以降では、以下2つの追加的な修正が必要です。


=== class.phpmailer.php ===
=== class.phpmailer.php ===
around line 162
162行目あたり
*Change <tt>var $Port = 25;</tt> to <tt>var $Port = 465;</tt>
*<tt>var $Port = 25;</tt> <tt>var $Port = 465;</tt> に変更してください。


=== class.smtp.php ===
=== class.smtp.php ===
around line 30
30行目あたり
*Change <tt>var $SMTP_PORT = 25;</tt> to <tt>var $SMTP_PORT = 465;</tt>
*<tt>var $SMTP_PORT = 25;</tt> <tt>var $SMTP_PORT = 465;</tt> に変更してください。


== Tips and tricks ==
== ヒント ==


* Some sites may need the additional step of un-commenting the '''php_openssl.dll''' extension in <tt>php.ini</tt>.
* いくつかのサイトでは、<tt>php.ini</tt>内の'''php_openssl.dll'''拡張モジュールのコメントを外す、追加的なステップが必要となります。<tt>php.ini</tt>.


== 関連情報==
== 関連情報==

2009年7月31日 (金) 15:00時点における版

作成中です - Mitsuhiro Yoshida 2009年7月30日 (木) 22:38 (UTC)

MoodleのSMTPサーバとして、Googleのメールサーバを設定することができます。これは、サーバ上でのメールサービスの必要性を減らすか、取り除くことができます。また、特に組織内でGoogle Apps を使用している場合、極めて有用です。

ここでは、コードの改造が必要となります。

メール設定

ロケーション: サイト管理 > サーバ > メール

SMTPホスト: smtp.gmail.com:465 メモ: Moodleバージョン1.9.2以降では、ポート (:465) を取り除いてください。

SMTPユーザ名: あなたのメールアドレス @gmail.com または、Google Appsを使用している場合、あなたのドメイン

SMTPパスワード: 上記メールアカウントのパスワード

コード修正

In your Moodle site go to /lib/phpmailer/ and modify the following file:

class.smtp.php

83行目あたり、Connect 関数のヘッダの後、"{" の後に次の行を挿入してください:

$host = 'ssl://' . $host;

コード修正 (1.9.2以降)

上記のSMTP hosts設定でポートを含むことができないため、1.9.2以降では、以下2つの追加的な修正が必要です。

class.phpmailer.php

162行目あたり

  • var $Port = 25;var $Port = 465; に変更してください。

class.smtp.php

30行目あたり

  • var $SMTP_PORT = 25;var $SMTP_PORT = 465; に変更してください。

ヒント

  • いくつかのサイトでは、php.ini内のphp_openssl.dll拡張モジュールのコメントを外す、追加的なステップが必要となります。php.ini.

関連情報

メール設定