Modifying the sender email in feedback form

Author Message

Xtian Xultz

Wednesday 09 March 2005 9:21:53 am

Hello!
The feedback form have a configuration about the sender email address and the recipient address. I didnt understand why of this.
So, when a user sends me a message via feeedback form, I receive an email in the address of the recipient from the email configured as send email, and inside the text is the email of the user (that he typed in the feedback form).
Is there a way that the incoming email comes to my recipient email addres, but with sender email == the user email? So, I just need to do a reply to the message to talk back to my user.

Thanx in advance for any suggestion.

Ɓukasz Serwatka

Friday 11 March 2005 1:39:33 am

Hi,

You can do this by changing the template for the feedback form, you will need to set the email_sender template variable e.g if the first (0) attribute is the email address

{set-block scope=global variable=email_sender}
    {$collection.attributes.0.data_text}
{/set-block}

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

J-A Eberhard

Friday 07 October 2005 9:45:07 am

Are you thinking of the feedback_form.tpl what is in
templates/collectedinfomail/ or in node/view/full/ ?
J-A Eberhard

Open Source Solution Provider
Open-Net Ltd Switzerland
http://www.open-net.ch

Matthew Carroll

Tuesday 11 October 2005 4:17:21 pm

J-A Eberhard: yes, the template you need to customise to make this work is templates/collectedinfomail/feedback_form.tpl

I now have my feedback form sending to the contact person for our site 'from' the site user, also with the subject line set. $collection.attributes follows the order of the information in the feedback_form class, so for for me (and for the standard feedback_form class):

$collection.attributes.0.data_text = subject
$collection.attributes.1.data_text = message
$collection.attributes.2.data_text = email

As an example, here is my customised template:

{set-block scope=root variable=subject}New Enquiry: {$collection.attributes.0.data_text}{/set-block}
{set-block scope=root variable=email_receiver}{$object.data_map.recipient.content}{/set-block}
{set-block scope=global variable=email_sender}{$collection.attributes.2.data_text}{/set-block}
{* Set this to redirect to another node
{set-block scope=root variable=redirect_to_node_id}2{/set-block}
*}
Hi there, this is the automated Ban Terminator website
contact form here, with another happy enquiry for you to
follow up on. You should be able to reply to this email,
and it will go straight to them.

Here are the details they entered on the website:

----------------------------------------------------------

email address: {$collection.attributes.2.data_text}
subject: {$collection.attributes.0.data_text}

message:

{$collection.attributes.1.data_text}

finally, a very useful page from the old docs is here:

http://ez.no/products/ez_publish_cms/documentation/customization/components/information_collection

http://carroll.org.uk

Kevin Compton

Friday 02 March 2007 10:49:03 am

sorry to resurect this, but I have the same issue. I'm also an idiot, so I was hoping someone could see my code then tell me what I need to change in it to fix it for having the sender appear as the person who submitted the form, instead of it being my e-mail address every time.


{set-block scope=root variable=subject}{"Collected information from %1"|i18n("design/base",,array($collection.object.name|wash))}{/set-block}

{set-block scope=root variable=email_receiver}{$object.data_map.recipient.content}{/set-block}

{* Set this to redirect to another node
{set-block scope=root variable=redirect_to_node_id}2{/set-block}
*}

{"The following information was collected"|i18n("design/base")}:

{section name=Attribute loop=$node.data_map}



{if and(ne($Attribute:item.contentclass_attribute_name,'Recipient'),
ne($Attribute:item.contentclass_attribute_name,'Name'),
ne($Attribute:item.contentclass_attribute_name,'Description'))}

{if eq($Attribute:item.contentclass_attribute_name,'Vibration Transducers')}
	<br /><strong>I am interested in:</strong><br />
{/if}

{if eq($Attribute:item.contentclass_attribute_name,'Utility')}
	<br /><strong>Company Description Profile:</strong><br />
{/if}


{$Attribute:item.contentclass_attribute_name|wash}:
{attribute_result_gui view=info attribute=$:item}

{/if}
{/section}

Xavier Serna

Tuesday 06 March 2007 3:31:28 am

Its simple enough, you have to add this line to set the email sender:

{set-block scope=global variable=email_sender}{$collection.attributes.2.data_text}{/set-block}

and replace {$collection.attributes.2.data_text} with your attribute of the form, where the user enters his email.

hope this helps!

--
Xavier Serna
eZ Publish Certified Developer
Departament de Software
Microblau S.L. - http://www.microblau.net
+34 937 466 205

Kevin Compton

Tuesday 13 March 2007 2:04:30 pm

this didn't work.

Do I need to put this text you gave me in a certain specific location within the file?

Perhaps I put the wrong attribute for the sender?

Heres what i put in

{set-block scope=root variable=email_receiver}{$object.data_map.recipient.content}{/set-block}

Xavier Dutoit

Tuesday 13 March 2007 9:57:29 pm

Haven't tried, but what you write hasn't the same scope than the examples (root vs. global).

X+

http://www.sydesy.com

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 19:13:49
Script start
Timing: Jan 18 2025 19:13:49
Module start 'layout'
Timing: Jan 18 2025 19:13:49
Module start 'content'
Timing: Jan 18 2025 19:13:50
Module end 'content'
Timing: Jan 18 2025 19:13:50
Script end

Main resources:

Total runtime0.7767 sec
Peak memory usage4,096.0000 KB
Database Queries82

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 589.4922152.6406
Module start 'layout' 0.00590.0033 742.132839.4766
Module start 'content' 0.00910.7660 781.6094806.3281
Module end 'content' 0.77510.0015 1,587.937520.1250
Script end 0.7766  1,608.0625 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.4163160.0002
Check MTime0.00140.1770160.0001
Mysql Total
Database connection0.00110.136810.0011
Mysqli_queries0.699390.0374820.0085
Looping result0.00100.1329800.0000
Template Total0.735194.620.3675
Template load0.00260.330020.0013
Template processing0.732594.311820.3662
Template load and register function0.00020.026910.0002
states
state_id_array0.00160.202810.0016
state_identifier_array0.00180.227120.0009
Override
Cache load0.00220.2834480.0000
Sytem overhead
Fetch class attribute can translate value0.00090.118970.0001
Fetch class attribute name0.00090.1220130.0001
XML
Image XML parsing0.00280.359570.0004
class_abstraction
Instantiating content class attribute0.00000.0031130.0000
General
dbfile0.00130.1726410.0000
String conversion0.00000.000940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 34
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs