dongtuoleng8624 2015-05-07 10:35
浏览 191
已采纳

Drupal - PHP SMTP设置正确但电子邮件不会发送

I get the following error when my Drupal site tries to send out a welcome email when users are signed up: Failed to connect to mailserver at "secure.emailsrvr.com" port 465, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()

I at first set the following in PHP.ini:

 SMTP = secure.emailsrvr.com
    SMTP_PORT = 465
    sendmail_from = support@managerspitstop.com
    username = support@managerspitstop.com
    password = ****

But I still got the error above so I added the following into the mail.inc file which is a file within the Drupal site:

 ini_set("SMTP","secure.emailsrvr.com");
    ini_set("smtp_port","465");
    ini_set("username", "support@managerspitstop.com");
    ini_set("password", "*****");
    ini_set("sendmail_from", "support@managerspitstop.com");

But still get the same error. So I contacted Rackspace who I have set up the email with and they have told me the settings I am using are correct. To test this I added the email to Outlook 2013 send out and email and received an email just fine.

I have looked around and couldn't find a solution. Any help will be greatly appreciated.

  • 写回答

2条回答 默认 最新

  • douzhechi2435 2015-05-07 12:27
    关注

    BLOODY DRUPAL! Managed to get it working. Turns out my email settings were correct the whole time.

    I fixed it by downloading Drupals SMTP module which I placed in httpdocs/sites/all/modules/smtp and then I downloaded phpmailer version 2.2.1 (only required if you are running Drupal 6.x and do not use a version of PHPMailer any higher than 2.2.1 as it will not work) https://github.com/PHPMailer/PHPMailer/releases/tag/v2.2.1 I placed this at httpdocs/sites/all/modules/smtp/phpmailer.

    Once that was sorted I went into the Administration section of my Drupal site and went to the modules section and typed in the email settings and BAM it worked :D.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 乌班图ip地址配置及远程SSH
  • ¥15 怎么让点阵屏显示静态爱心,用keiluVision5写出让点阵屏显示静态爱心的代码,越快越好
  • ¥15 PSPICE制作一个加法器
  • ¥15 javaweb项目无法正常跳转
  • ¥15 VMBox虚拟机无法访问
  • ¥15 skd显示找不到头文件
  • ¥15 机器视觉中图片中长度与真实长度的关系
  • ¥15 fastreport table 怎么只让每页的最下面和最顶部有横线
  • ¥15 java 的protected权限 ,问题在注释里
  • ¥15 这个是哪里有问题啊?