Ok, I'm new to drupal but I set up an email action to email me and associated it with a new comment. Then I added a comment as someone else and no email arrived. Then I found Using Drupal's email address in the mail.inc main function with -f which seemed to suggest the from address must be set if you are on fasthosts. Anyway the patch provided to mail.inc worked just fine. I include it here, partly as a reminder to me that I made this change:
--- mail.inc
.orig 2008
-01
-25 17
:04
:00
.000000000
+0000
+++ mail.inc
.new 2008
-04
-05 20
:35
:52
.991525652
+0100
@@ -181
,13
+181
,19
@@ function drupal_mail_send
($message) {
foreach ($message['headers'] as $name => $value) {
$mimeheaders[] = $name .': '. mime_header_encode
($value);
}
+
+ // added 5.4.08
+ // fasthosts needs -f parameter
+ $from = variable_get
('site_mail', ini_get('sendmail_from'));
+
return mail(
$message['to'],
mime_header_encode
($message['subject']),
// Note: e-mail uses CRLF for line-endings, but PHP's API requires LF.
// They will appear correctly in the actual e-mail that is sent.
str_replace("\r", '', $message['body']),
- join("\n", $mimeheaders)
+ join("\n", $mimeheaders),
+ "-f$from"
);
}
}
BTW, I can find an API reference to variable_get and can see it gets 'site_email' and defaults to 'sendmail_from' but where the hell would 'sendmail_from' actually go assuming I wanted a different email address to the 'site_email'.
Trackback URL for this post:
http://www.martin-evans.me.uk/trackback/25
Recent comments
35 weeks 4 days ago
38 weeks 16 hours ago
39 weeks 4 days ago
39 weeks 5 days ago
47 weeks 6 days ago
49 weeks 14 hours ago
50 weeks 3 days ago
1 year 1 week ago
1 year 5 weeks ago
1 year 8 weeks ago