Forums / Setup & design / How can i specify email receiver for different form?

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,

eZ debug

Timing: Jan 19 2025 07:28:27
Script start
Timing: Jan 19 2025 07:28:27
Module start 'content'
Timing: Jan 19 2025 07:28:28
Module end 'content'
Timing: Jan 19 2025 07:28:28
Script end

Main resources:

Total runtime1.3902 sec
Peak memory usage4,096.0000 KB
Database Queries202

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0074 589.1797180.8125
Module start 'content' 0.00741.2217 769.9922612.9844
Module end 'content' 1.22910.1611 1,382.9766337.3672
Script end 1.3901  1,720.3438 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00460.3281210.0002
Check MTime0.00170.1205210.0001
Mysql Total
Database connection0.00070.053910.0007
Mysqli_queries1.299893.49682020.0064
Looping result0.00270.19472000.0000
Template Total1.351797.220.6759
Template load0.00210.154320.0011
Template processing1.349697.079620.6748
Template load and register function0.00030.018410.0003
states
state_id_array0.00120.089410.0012
state_identifier_array0.00170.119520.0008
Override
Cache load0.00180.1281370.0000
Sytem overhead
Fetch class attribute can translate value0.00180.128540.0004
Fetch class attribute name0.00160.113370.0002
XML
Image XML parsing0.00590.427540.0015
class_abstraction
Instantiating content class attribute0.00000.001890.0000
General
dbfile0.00630.4524350.0002
String conversion0.00000.000630.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
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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 26
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs