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

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.

图片转代码服务由CSDN问答提供 功能建议

当我的Drupal网站尝试在用户注册时发送欢迎电子邮件时出现以下错误:失败 连接到“secure.emailsrvr.com”端口465的邮件服务器,验证php.ini中的“SMTP”和“smtp_port”设置或使用ini_set()

我首先设置以下内容 在PHP.ini中:

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

但我仍然遇到上述错误,因此我将以下内容添加到了mail.inc文件中,该文件是Drupal站点中的一个文件 :

  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”); 
    
 
 

但仍然会得到同样的错误。 所以我联系了我已经设置了电子邮件的Rackspace,他们告诉我我使用的设置是正确的。 为了测试这个,我将电子邮件添加到Outlook 2013发送并发送电子邮件并收到一封电子邮件。

我环顾四周,找不到解决方案。 任何帮助将不胜感激。

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

2条回答 默认 最新

相关推荐 更多相似问题