How can i specify email receiver for different form?

Author Message

Leeloo Dalas

Thursday 26 May 2005 3:46:10 am

Hello!

I have some form wich is used in differents parts of the site with different email receiver in each part.

In the file 'settings/siteaccess/my_site/site.ini.append.php' i did specify who is going to be the e-mail reciver.

[InformationCollectionSettings]
EmailReceiver=my_email@my_domain.com

How can i specify different email receiver for each form?

(For example:
data from partners registration form should be send on partners@my_domain.com,

data from PR registration form should be send on PR@my_domain.com)

Łukasz Serwatka

Thursday 26 May 2005 5:18:26 am

Hi,

To your feedback class add new attribute Recipient (Identifier: recipient) [Email datatype] which isn`t information collector. Now for every object (Feedback form) you can set Recipient e-mail.

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

Leeloo Dalas

Friday 27 May 2005 1:47:53 am

Ok.Thanks for your answer.
One more detail.
I did add this attribute, but where should i set Recipient e-mail: in template, ini files, some where in kernel code, lib? (seems like this attribute doesn't have default value).

luis muñoz

Wednesday 29 June 2005 7:49:27 am

I added the attribute to the class, added to my siteaccess design override/templates/content/collectinfomail/ form.tpl and feedback_form.tpl but it still sends the email to the address specified in the ini file.
Do i have to add any hidden field to the template?
Any idea?
This is the code i'm using to generate the code:

Thanks

{include name=Validation uri='design:content/collectedinfo_validation.tpl'
                 class='message-warning'
                 validation=$validation collection_attributes=$collection_attributes}

<form method="post" action={"content/action"|ezurl}>
{section var=Attributes loop=$node.object.contentobject_attributes}
    {section show=$Attributes.item.display_info.view.grouped_input}
    <fieldset>
        <legend>{$Attributes.item.contentclass_attribute.name|wash}</legend>
        {attribute_view_gui attribute=$Attributes.item}
    </fieldset>
    {section-else}
        <label>{$Attributes.item.contentclass_attribute.name|wash}:</label>
        {attribute_view_gui attribute=$Attributes.item}
    {/section}
	<br><br><br>
{/section}

<div class="content-action">
            <input type="submit" class="defaultbutton" name="ActionCollectInformation" 
                   value="{"Send form"|i18n("design/base")}" />
            <input type="hidden" name="ContentNodeID" value="{$node.node_id}" />
            <input type="hidden" name="ContentObjectID" value="{$node.object.id}" />
            <input type="hidden" name="ViewMode" value="full" />
        </div>
</form>

Leeloo Dalas

Friday 01 July 2005 2:04:10 am

Here you can find usefull information i think.
http://ez.no/ez_publish/documentation/customization/components/information_collection

Then look into part 6 in this page- "<b>Create the override template to send the emails</b>"

In this template look here:

{* Use this line to specify the e-mail in the template, can read this from the object to make it dynamic pr form *} 

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

So, {$object.data_map.<b>reciver</b>.content} will be your recipient. <b>reciver</b>-name of attribute that you have to add into the class,

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 20:53:13
Script start
Timing: Jan 18 2025 20:53:13
Module start 'layout'
Timing: Jan 18 2025 20:53:13
Module start 'content'
Timing: Jan 18 2025 20:53:14
Module end 'content'
Timing: Jan 18 2025 20:53:14
Script end

Main resources:

Total runtime0.5698 sec
Peak memory usage4,096.0000 KB
Database Queries65

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0046 589.5703152.6563
Module start 'layout' 0.00460.0021 742.226639.4922
Module start 'content' 0.00670.5615 781.7188607.8750
Module end 'content' 0.56820.0015 1,389.593816.1250
Script end 0.5697  1,405.7188 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00280.4994160.0002
Check MTime0.00120.2154160.0001
Mysql Total
Database connection0.00080.138510.0008
Mysqli_queries0.511789.8020650.0079
Looping result0.00060.1001630.0000
Template Total0.542295.220.2711
Template load0.00190.332620.0009
Template processing0.540394.832720.2702
Template load and register function0.00020.034210.0002
states
state_id_array0.00100.175710.0010
state_identifier_array0.00100.171820.0005
Override
Cache load0.00160.2781370.0000
Sytem overhead
Fetch class attribute can translate value0.00060.106930.0002
Fetch class attribute name0.00130.229670.0002
XML
Image XML parsing0.00220.380730.0007
class_abstraction
Instantiating content class attribute0.00000.003290.0000
General
dbfile0.00400.7103240.0002
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
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/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: 26
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs