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

提供:MoodleDocs
移動先:案内検索
(ページの作成: 作成中です - ~~~~ Google's mail servers can be set up as the SMTP server for Moodle. This reduces or eliminates the need for an email service on a server and is especially...)
 
編集の要約なし
1行目: 1行目:
作成中です - [[利用者:Mitsuhiro Yoshida|Mitsuhiro Yoshida]] 2009年7月30日 (木) 22:38 (UTC)
作成中です - [[利用者:Mitsuhiro Yoshida|Mitsuhiro Yoshida]] 2009年7月30日 (木) 22:38 (UTC)


Google's mail servers can be set up as the SMTP server for Moodle.  This reduces or eliminates the need for an email service on a server and is especially useful if [http://www.google.com/apps/ Google Apps] is used by the institution using Moodle. 
MoodleのSMTPサーバとして、Googleのメールサーバを設定することができます。これは、サーバ上でのメールサービスの必要性を減らすか、取り除くことができます。また、特に組織内で[http://www.google.com/apps/ Google Apps] を使用している場合、極めて有用です。


This will require a hack to the code.
ここでは、コードの改造が必要となります。


== [[メール設定]] ==
== [[メール設定]] ==
Location: ''Administration > Server > [[Email settings|Email]]''
ロケーション: サイト管理 > サーバ > [[メール設定|メール]]


'''SMTP hosts:''' smtp.gmail.com:465  ''NOTE: Leave out the port (:465) in 1.9.2 or lower''
'''SMTPホスト:''' smtp.gmail.com:465  メモ: Moodleバージョン1.9.2以降では、ポート (:465) を取り除いてください。


'''SMTP username:''' Your email address @gmail.com or your own domain if using Google Apps
'''SMTPユーザ名:''' あなたのメールアドレス @gmail.com または、Google Appsを使用している場合、あなたのドメイン


'''SMTP password:''' password for the above email account
'''SMTPパスワード:''' 上記メールアカウントのパスワード


== Code Modification ==
== コード修正 ==
In your Moodle site go to <tt>/lib/phpmailer/</tt> and modify the following file:
In your Moodle site go to <tt>/lib/phpmailer/</tt> and modify the following file:



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

作成中です - 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

Around line 83 DIRECTLY after the Connect function header, insert this line immediately after the "{" :

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

Code Modification (1.9.2 or lower)

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.

class.phpmailer.php

around line 162

  • Change var $Port = 25; to var $Port = 465;

class.smtp.php

around line 30

  • Change var $SMTP_PORT = 25; to var $SMTP_PORT = 465;

Tips and tricks

  • Some sites may need the additional step of un-commenting the php_openssl.dll extension in php.ini.

関連情報

メール設定