那麼下面就簡單將步驟說一下吧:
1,下載工具
phpmailer module
http://drupal.org/project/phpmailer
phpmailer libary(模塊需要這個文件裏面的兩個class文件的支持)
三選一:http://sourceforge.net/project/showfiles.php?group_id=26031
http://sourceforge.net/projects/phpmailer/
2,安裝
解壓剛纔下載的兩個文件,將phpmailer文件(注意大小寫)放到durpal/sites/all/modules/下面,然後在,然後打開phpmailer這個模塊文件,看到有一個子文件夾phpmailer,這個子文件夾下有一個文本文件COPYHERE.txt ,打開看到這樣的一句話:
Copy the downloaded files class.phpmailer.php class.smtp.php into this directory.
提示需要class.phpmailer.php class.smtp.php這兩個class文件;解壓第一步中說的第二個文件(PHPMailer_v5.1.zip);在這個文件裏面找到需要的兩個class文件,然後複製到drupal/sites/all/modules/phpmailer/phpmailer/這個文件下(剛纔提到的phpmailer的子文件夾)。
ok,已經安裝好了。
3,配置
以管理員身份登錄Drupal,打開Administrator->site configuration->PHPMailer,我使用的gmail提供的smtp服務,phpmailer也推薦使用gmail;
* SMTP server: smtp.gmail.com
* SMTP port: 465
* Secure protocol: SSL
* Username: <your google mail name>@gmail.com
* Password: <your google mail password>
下面是SMTP的設置:
ok,最後面那個test郵箱,自己隨便填寫一個,測試一下吧!