那么下面就简单将步骤说一下吧:

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/


http://phpmailer.codeworxtech.com/(我用这个链接下载的)

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>

fc9641af73fcc0d5faed50d2.jpg


下面是SMTP的设置:

13b6544a3fadca0d09f7efa8.jpg


ok,最后面那个test邮箱,自己随便填写一个,测试一下吧!