Both contact forms and simplenews work with drupal_mail
but the module does not set the return-path for those
meanwhile for webform emails the return-path is correctly set

it could be a bug or it could be the way these modules operate !!

Comments

budda’s picture

Status: Active » Closed (works as designed)

Yeah the two modules you mention handle mail themselves - bypassing drupals built in system. Hence this module wont help you there.

Robert Molenaar’s picture

Solved it in D6 with Mimemail (in combo with simplenews)

I found the solution for Drupal 6 with mimemail by adding the following code:

ini_set("sendmail_from","mail@domain.com");

I placed it in the mimemail.module just above the mail() function... I know for sure it can be done beter, but then again it works...

I had this problem with simplenews and mimemail.

Robert

PS: On the downside... before the patch my testmail wasn't blocked as spam by hotmail, but now it is... maybe of all the testmails...??)

encho’s picture

Where exactly is the function?

HTF’s picture

I would also like to know where the mail()function is in the mimemail.module

Robert Molenaar’s picture

Sorry for the late response.

I use Mime mail version 6.x-1.x-dev

The function is on line (+_) 226

My code now looks like.

-----
ini_set("sendmail_from","me@mydomain.com");

foreach ($message['address'] as $a) {
$status = mail(
$a,
$message['subject'],
$message['body'],
mimemail_rfc_headers($message['headers'])
) && $status;
-----

I'am sorry that I do not provide a patch file... I will try to do this later.

Robert

drupalfan2’s picture

Isn't there any suitable solution for this (for mime mail and simplenews)??