[英]Drupal 7 is not sending emails
I've a website created with drupal 7 with a customized theme, all seems to be fine except the contact form is not working. 我有一个用drupal 7创建的网站,有一个自定义的主题,除了联系表格不起作用外似乎都很好。
I have tested the server installation using a very basic PHP script to send emails, and the server seems to be well configured, but still Drupal does not send the emails. 我已经使用非常基本的PHP脚本测试了服务器安装来发送电子邮件,并且服务器似乎配置得很好,但Drupal仍然没有发送电子邮件。
As I'm less than a newbie in drupal, can any one tell me what I need to check to know where the problem is coming from, that I can hopefully fix it ? 由于我不是一个drupal的新手,任何人都可以告诉我需要检查什么,以了解问题的来源,我希望能解决它?
Further informations: 进一步的信息:
UPDATE UPDATE
This is the scritp I used to test if my server is configured to send emails: 这是我用来测试我的服务器是否配置为发送电子邮件的scritp:
<?php
$to = "myemail@domaine.com";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
if (mail($to, $subject, $body)) {
echo("<p>Message successfully sent!</p>");
} else {
echo("<p>Message delivery failed...</p>");
}
As GeoPhonix suggested to me, I had a look on the log files on my server /var/log/mail.lo
and I noticed that the email was sent but to a different email address which was set there by the website creator, and as I'm a less than newbie I could figure where the email address was set, following are the steps I solved my problem with: 正如GeoPhonix向我建议的那样,我查看了我的服务器
/var/log/mail.lo
上的日志文件,我注意到该电子邮件已发送,但发送到网站创建者设置的其他电子邮件地址,以及我不是新手,我可以想出电子邮件地址的设置位置,以下是我解决问题的步骤:
tail -f /var/log/mail.log
I could watch the log changes tail -f /var/log/mail.log
我可以看到日志更改 phpmyadmin
the whole database to fin the email in the webform table phpmyadmin
搜索整个数据库来查找webform表中的电子邮件 webform
was mentioned to find where to change the email config webform
一词的每个部分,以找到更改电子邮件配置的位置 I just wanted to write what I did, may be someone will have the same issue or a similar one, that he can have a idea how to debug things 我只是想写下我所做的事情,也许有人会有同样的问题或类似的问题,他可以知道如何调试东西
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.