drupal网站邮件发送功能的实现

drupal站点能够使用gmail邮箱向用户发送邮件,实现相似的功能有SMTP或者PHPmailer模块,我使用的是phpmailer模块,下面是我配置的过程,贴出来供你们参考。php

一、下载phpmailer模块服务器

        http://drupal.org/project/phpmailer测试

二、启用phpmailer模块,在“站点设置”点“PHPmailer”进行设置时,页面会报错“Class 'PHPMailer' not found in ....phpmailer.class.inc”。网站

为何呢?原来phpmailer模块还须要 class.phpmailer.php  class.smtp.php  this

打开phpmailer模块下phpmailer文件夹,文件夹下有个COPYHERE.txt,打开能够看一句话:
Copy the downloaded files   class.phpmailer.php  class.smtp.php   into this directory.
加密

因此安装模块时,须要仔细阅读模块中的说明文档,以减小出错的机会。spa

以上两个文件能够去下面的连接下载:.net

http://sourceforge.net/projects/phpmailer/files/
ssl

 

drupal网站邮件发送功能的实现 - 小树 - wuzhangshu927 的博客 

 

三、ok,下载了上面须要的文件后,就能够去配置phpmailer了 文档

gmail的SMTP服务器为:smtp.gmail.com,

端口为: 465,这个该页面有提示。

Use encrypted protocol(是否使用加密协议):这个选用ssl 

用户名: 输入你gmail的用户名,注意这里不要加上@gmail.com,前面的就能够了。 

密码:就是你gmail账号的密码 

名称: 邮件中发件人的名称

 测试邮箱地址:你能够输入一个本身的邮箱,看看能不能收到邮件。

 

四、设置完成后,看邮箱就能够收到网站发出的邮件啦。

相关文章
相关标签/搜索