Setting Reply-To Header in Email Templates

Support

Support
A public community space for Developers, IT Professionals, Architects, and System Administrators to engage and help each other, share knowledge and best practices, find product documentation and Q&A, and discuss technology oriented topics.

Setting Reply-To Header in Email Templates

This question has suggested answer(s)

Since our upgrade to Enterprise 3.1 (Evolution 6.x) the emails coming from Infolink posts have a Reply-to header included that it did not have before. The problem is that they include the From address AND the To address in the Reply-to header so just clicking Reply in the email client is like clicking Reply All. We want this to go back to the way it was behavior wise, which means changing the Reply-to header to only include the From address or to remove the Reply-to header altogether.

Telligent support gave me a copy of all of the email templates and said:

This should be added to the subject area.

$email_header.SetHeader('Reply-To', '')

I have looked through all of the email templates and there is nothing that looks anything like this that I could use as an example. Telligent Support pointed me to the documentation page that does not mention anything helpful.

Does anyone have any experience with mail templates and specifically setting something in the email header? It probably is just a matter of adding one line to the templates, but I am unwilling to break email from production server just to blindly try something. If you can provide anything that is like a real life example it would be helpful.

All Replies
  • Hi Bill,

    $email_header.SetHeader('Reply-To', '') is an extension endpoint that lets you set header values.  None of the templates use them by default because the default header values are set in the code, this extension is there for cases like this where the default behavior should be changed.  Taking the forum_post_mailgateway.xml file as an example (probably the one you're wanting to change):

    <subject>
    	<![CDATA[
    $email_header.SetHeader('Reply-To', '')
    #if($core_v2_forumThread.Current)
    	#set($post = $core_v2_forumThread.Current)
    #else
    	#set($post = $core_v2_forumReply.Current)
    #end
    $email_utility.FormatSubjectWithMailingList($post)
    	]]>
    </subject>

    The first line after CDATA is the markup given to you by the Support team and where to add it.

  • Thanks Blake. That does in deed appear exactly the example I was looking for.
     
    Cheers,
    Bill
     
     
    From: Blake "Howdy" Smith [mailto:bounce-bsmith@communities.telligent.com]
    Sent: Monday, October 22, 2012 1:57 PM
    To: bugs_enterprise@communities.telligent.com
    Subject: RE: [Bugs and Issues - Telligent Enterprise] Setting Reply-To Header in Email Templates
     

    Hi Bill,

    $email_header.SetHeader('Reply-To', '') is an extension endpoint that lets you set header values.  None of the templates use them by default because the default header values are set in the code, this extension is there for cases like this where the default behavior should be changed.  Taking the forum_post_mailgateway.xml file as an example (probably the one you're wanting to change):

    <subject>      <![CDATA[ $email_header.SetHeader('Reply-To', '') #if($core_v2_forumThread.Current)     #set($post = $core_v2_forumThread.Current) #else         #set($post = $core_v2_forumReply.Current) #end $email_utility.FormatSubjectWithMailingList($post)   ]]> </subject>

    The highlighted part is the markup given to you by the Support team and where to add it.