Form and Use Proper From and Reply-To Fields

Chad_Dupuis - January 30, 2009 - 21:30
Project:Forward
Version:5.x-1.9
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

As it stands now the forward module will not work well with restrictive ISP's who require the from address not be an unknown (out of domain) address. The proper formation should be that the from is always from your site and the reply-to is the person who sent the forward. This will ensure the messages get through various spam blocks, etc. as well as more restrictive ISP's.

The attached patch accomplishes this.

Users who need this, may also find the following fix for the contact module helpful:
http://drupal.org/node/366238#comment-1228416

AttachmentSize
forward-proper-from-replyto.patch424 bytes

#1

ferrangil - September 7, 2009 - 08:45
Status:needs review» reviewed & tested by the community

This is working just great for Drupal 5.

Thank you very very much!

#2

Chad_Dupuis - September 12, 2009 - 21:21

For d6 you would do add the following to the bottom of forward.module

// This will set proper from and reply-to fields
// For this to work properly you must not set a default from address in the modules configuration page
function forward_mail_alter(&$message) {
$properfrom = variable_get('site_mail','');
$properreplyto = $message['from'];
$message['headers']['From'] = $properfrom;
$message['headers']['Reply-To'] = $properreplyto;
}

Similar from reply-to settings for the overall contact form is here:
http://drupal.org/node/366238#comment-1597554

#3

seanr - November 3, 2009 - 22:37
Status:reviewed & tested by the community» fixed

Fixed in both branches. Releases will be out later tonight.

#4

System Message - November 17, 2009 - 22:40
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.