Email receiver, help !!

Author Message

Daniel Farray

Thursday 29 November 2007 1:42:04 pm

I have created a feedback form. It always sends an email to the Admin email in site.ini. I want to be able to use an email in an attribute of a class (not data collector).

I tried this but it does not work:

Say the class attributes are:
- name (datacollector)
- sendTo (this has the email where the form should be sent to)

I am trying to change the email_receiver variable with the data provided in "sendTo" attribute...

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

But it does not work.

Thank you for you time.

Daniel Farray

Thursday 29 November 2007 2:21:06 pm

Sorted. Thanks anyway.

D K

Thursday 29 January 2009 8:43:40 pm

I have the same problem. Can you please explain how did you sort it out?

http://www.eyepax.com

Koutouan Emmanuel

Friday 30 January 2009 7:22:10 am

hello,

In the class of form add 3 attibutes: receiver[email], sender[email] and subjet[line of text]

In form.tpl (/design/xxx/templates/content/collectedinfomail/form.tpl),
clean all and paste :

{*start*}
{set-block scope=root variable=email_receiver}{$object.data_map.receiver.content}{/set-block}
{set-block scope=root variable=email_sender}{$object.data_map.sender.content}{/set-block}
{set-block scope=root variable=subject}{$object.data_map.subjet.content}{/set-block}
{"The following information was collected"|i18n("design/ezwebin/collectedinfomail/form")}:
{foreach $collection.attributes as $attribute}
<p>
{$attribute.contentclass_attribute_name|wash}:
{attribute_result_gui view=info attribute=$attribute}
</p>
{/foreach}
{*end*}

copy, paste

bye

Matthias Wittwer

Monday 09 February 2009 12:52:36 am

Doesn't work for me as well.
I am using 4.0.

If I put the email adress like this it works:

{set-block scope=root variable=email_receiver}my_email_to_send_to@my_url.com{/set-block}

This does not work, even if the output of the variable in the so-called mail body is correct!

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

Mail body:
SendTo: {$object.data_map.sendTo.content}

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 11:11:22
Script start
Timing: Jan 18 2025 11:11:22
Module start 'layout'
Timing: Jan 18 2025 11:11:22
Module start 'content'
Timing: Jan 18 2025 11:11:23
Module end 'content'
Timing: Jan 18 2025 11:11:23
Script end

Main resources:

Total runtime0.9125 sec
Peak memory usage4,096.0000 KB
Database Queries67

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0049 587.8125152.6094
Module start 'layout' 0.00490.0026 740.421939.4141
Module start 'content' 0.00740.9031 779.8359592.1016
Module end 'content' 0.91050.0020 1,371.937512.1875
Script end 0.9125  1,384.1250 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3554160.0002
Check MTime0.00140.1509160.0001
Mysql Total
Database connection0.00050.058110.0005
Mysqli_queries0.848592.9788670.0127
Looping result0.00090.0983650.0000
Template Total0.883296.820.4416
Template load0.00210.235620.0011
Template processing0.881096.548420.4405
Template load and register function0.00070.074910.0007
states
state_id_array0.00070.072810.0007
state_identifier_array0.00090.099020.0005
Override
Cache load0.00180.2017420.0000
Sytem overhead
Fetch class attribute can translate value0.00090.094940.0002
Fetch class attribute name0.00210.228850.0004
XML
Image XML parsing0.00050.052740.0001
class_abstraction
Instantiating content class attribute0.00000.001650.0000
General
dbfile0.00080.0912100.0001
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
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/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: 22
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs