Hi,
Great module. Good work guys.
Just a quick one re: Return-Path issue with sending emails from a website....I'm not sure how prevelant or common this is or whether it's specific to my server, but I thought I would post in case it helps others:
The Problem
When sending an email using simplenews.module my server automatically picks up an apache@drupalsite.org email address and sets that as the RETURN-PATH in the sent email.
That's not good.
Solution
Change line 182 in the activemaillib.php file that comes with simplenews.module from this:
if($serv[0]==true) $this->mailsent[$res]=mail($res, $this->mailsubj, $this->mailbody, $this->mailheaders);
to this:
if ($serv[0]==true) $this->mailsent[$res]=mail($res, $this->mailsubj, $this->mailbody, $this->mailheaders, '-f your@site.com');
Where your@site.com is the correct RETURN-PATH for your site.
As I mentioned earlier..I'm not too sure how common this is but, there it is for anyone who is experiencing the same problem.
Dub
Comments
Comment #1
buddaI've not looked at the insides of simplenews.module and how it sends email, but if it works nicely with the Drupal core user_mail() then I have just released a solution to the evil return-path header problem - check http://drupal.org/project/returnpath
Comment #2
buddaHaving got round to looking at Simplenews i see that it uses a stand alone mail handler class. So ignore previous comment.
Comment #3
voidberg commentedSee here for a solution: http://drupal.org/node/101428
Comment #4
dokumori commentedThanks Dublin Drupaller. I was looking for this.
By the way, if you use $this->mailfrom like shown below, it inserts the "From" email address.
(note double-quotation instead of single)
I think this is a good way if you do not want to hard-code your email address.
Pixelmonk's followup is also useful, but it is for 'Reply-to', not 'Return Path'. Technically they are different.
Comment #5
sutharsan commentedComment #6
sutharsan commented