Forums / Developer / Email receiver, help !!

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}

eZ debug

Timing: Jan 30 2025 16:31:39
Script start
Timing: Jan 30 2025 16:31:39
Module start 'content'
Timing: Jan 30 2025 16:31:39
Module end 'content'
Timing: Jan 30 2025 16:31:39
Script end

Main resources:

Total runtime0.2053 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0077 587.8281370.3047
Module start 'content' 0.00770.0134 958.13281,005.5000
Module end 'content' 0.02120.1840 1,963.63283,894.1641
Script end 0.2052  5,857.7969 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00562.7348200.0003
Check MTime0.00140.6734200.0001
Mysql Total
Database connection0.00130.620610.0013
Mysqli_queries0.109053.09191410.0008
Looping result0.00120.59411390.0000
Template Total0.183689.510.1836
Template load0.00080.399010.0008
Template processing0.182889.062810.1828
Override
Cache load0.00060.296210.0006
Sytem overhead
Fetch class attribute can translate value0.00180.862810.0018
XML
Image XML parsing0.00030.124310.0003
General
dbfile0.00823.9951200.0004
String conversion0.00000.002830.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs