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}