Set ReplyTo Field to User Email Address in a flexible way

MedMan - November 25, 2008 - 23:39
Project:Notifications
Version:6.x-2.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

I am wanting to transfer a large Forum from phpBB to Drupal. Mail2Web is an important feature in enabling it to happen. Most of our existing Forums are Bulletin Board style so having the ReplyTo field set to send replies back to the Forum is just what is required. However, some of our Forums are used in a special way that requires setting the ReplyTo field to the author of the question, not back to the board.

I quite understand if this option is not on your to-do list but if at all possible I would appreciate some pointers on where in the coding I might insert a conditional statement to change the ReplyTo field for certain Forums.

#1

cglusky - January 18, 2009 - 16:55

you can modify the messaging templates to include [author-mail] token

so the mail could say something like...

"Click here to send a mail to the author"

otherwise replying to the mail will send it back to the site as a comment

#2

Ian Ward - February 17, 2009 - 15:51
Status:active» postponed (maintainer needs more info)

David - can you explain how it is determined whether the reply to field is to the board versus to the author's email address? Is this a checkbox that is checked when someone posts to the forum, or a setting for that whole forum? The dev version now handles per-content type activation of mail2web, so that you can have it turned on for the blog, but not for book pages nor casetracker cases. However, since a forum is a node, this would be a per-node control. I'm not sure I would add this into mail2web, but, I will think about making it possible to make a plugin module that could handle this outside of m2w.

Let me know if I am making sense and understand your situation properly.

thanks,
Ian

#3

MedMan - February 17, 2009 - 22:41

Thanks for your interest.

It is two specific Forums that have this facility at the moment. The control has been done by hacking the PHP file that controls outgoing mailing (m2f_mailinglist.php). This is the code used to control the ReplyTo Field in the outgoing emails:

// Insert conditional statements to control Reply-To field
if ($ml_config['list_email'] == "mednet@myca.org.uk")
{
$mail_msg->headers['Reply-To'] = '"'.$headers['username'] . '" <' . $headers['user_email'] . '>, "MedNet Display" <mednetdisplay@myca.org.uk>';
}
elseif ($ml_config['list_email'] == "balticnet@myca.org.uk")

$mail_msg->headers['Reply-To'] = '"'.$headers['username'] . '" <' . $headers['user_email'] . '>, "BalticNet Display" <balticnetdisplay@myca.org.uk>';
}
else
{
$mail_msg->headers['Reply-To'] = $ml_config['list_email'];
}

Needless to say, I did not write the code otherwise I wouldn't need to be asking the question!

As you will be able to see better than I can, for the two Forums concerned, the ReplyTo Field is set to include two email addresses separated by a comma: the member who posed the question and an Archive address (on the Drupal part of our site uploaded using Mailhandler). For all other Forums the ReplyTo address is set back to the Forum as per usual.

#4

Ian Ward - November 16, 2009 - 17:55
Project:Mail to Web» Mail Comment
Version:5.x-1.x-dev» 5.x-1.x-dev

Switch to mailcomment project. Mail2web is now known as "mailcomment" due to a trademark issue with the name mail2web.

#5

greggles - November 28, 2009 - 03:16
Title:Set ReplyTo Field to User Email Address» Set ReplyTo Field to User Email Address in a flexible way
Project:Mail Comment» Notifications
Version:5.x-1.x-dev» 6.x-2.x-dev
Status:postponed (maintainer needs more info)» active

If this happens anywhere I believe it should happen in Notifications, but really, this is a pretty specific feature. I think that it should be possible to do via code already and that Notifications should not provide a UI for this.

 
 

Drupal is a registered trademark of Dries Buytaert.