Forums / Developer / Problem send mail with feed back
Didier Kalulambi
Thursday 28 October 2010 1:54:58 am
I'm starting in ez. I have a problem to send my mail address: kkk@kkd.cd here is my form which collects the data:
{* DO NOT EDIT THIS FILE! Use template override INSTEAD year. *} {Def $ PageData ezpagedata = () $ = $ Pagedesign pagedata.template_look } <div class="summary"> {Attribute_view_gui attribute = $ node.data_map.description} {Include name = Validation uri = 'design: content / collectedinfo_validation.tpl' class = 'message-warning' validation = $ validation = $ collection_attributes collection_attributes} </ Div> <div class="user-register"> <Form method = "post" action = {"content / action" | ezurl} name = "form1"> <div class="attribute-header"> <h1 class="long"> BUY NOW <br/> Currentdate {() | datetime ('custom', '% F% dth% Y')} </ h1> </ Div> {Def $ current_user = fetch ('user', 'current_user') $ Nod_id ezhttp = ('usn', 'get') $ Nod = fetch ('content', 'node', hash (node_id, $ Nod_id)) } {If not ($ current_user.is_logged_in)} <div class="user_label"> <span> It Would Be Interesting to register, in order not to enter your information Every Time </ span> </ Div> <br/> {/ If} <Div class = "warning" id = "input_val" style = "display: none"> <h3> {"Input Did Not validate "| i18n ('design / ezwebin / user / register "}</ h3> <ul> <Li id = "input_val_1" style = "display: none"> First name: Input required. </ Li> <Li id = "input_val_2" style = "display: none"> Last name: Input required. </ li> <Li id = "input_val_3" style = "display: none"> Email address: Input required. </ li> <Li id = "input_val_4" style = "display: none"> Message: Input required. </ li> </ Ul> <br/> </ Div> <div class="user_requi"> <span> * </ span> Required </ Div> <br/> <div id="contact_buynow"> <div class="contact_buynow_1"> <div class="user-register_ligne"> <div class="user_label"> First <span> name * </ span> </ div> <Input class = "user_champ_input" type = "text" size = "10" name = "f_name" id = "id1" value = "{if $ Current_user.is_logged_in} {$ Current_user.contentobject.data_map.first_name.content} {/ if} tabindex = "1" /> </ Div> <div class="user-register_ligne"> Last <div class="user_label"> <span> name * </ span> </ div> <Input class = "user_champ_input" type = "text" size = "10" name = "l_name" id = "id2" value = "{if $ Current_user.is_logged_in} {$ Current_user.contentobject.data_map.last_name.content} {/ if} tabindex = "1" /> </ Div> <div class="user-register_ligne"> <div class="user_label"> Email <span> address * </ span> </ div> <Input class = "user_champ_input" type = "text" size = "10" name = "email" id = "id3" value = "{if $ Current_user.is_logged_in} {$ Current_user.contentobject.data_map.user_account.content.email} {/ if} tabindex = "1" /> </ Div> <Div class = "user- register_ligne "> <div class="user_label"> Choise Product <span> * </ span> </ div> {Def $ Bsps_tts = fetch ('content', 'list', hash (parent_node_id, 100))} <select name="choise_product"> {Foreach $ bsps_tts as $ bsps_tt <option value="aaa">}} {$ bsps_tt.name </ Option> {/ foreach} </ Select> </ Div> </ Div> <div class="contact_buynow_2"> <div class="user_label"> Message <span class="contact_mess"> * </ span> </ div> <Textarea class = "box" cols = "62" rows = "7" name = "message" id = "ID4"> $ {if} current_user.is_logged_in {$ Message.object.data_map.message.content} {/ if} </ textarea> </ Div> </ Div> <br/> <div class="contact_buynow_3"> <Input type = "image" class = "defaultButton" name = "ActionCollectInformation" alt = "ok" src = {'Adeneo / ok.png' | ezimage} value = "{" Send form "| i18n ('design / ezwebin / full / feedback_form"} "/> <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> <br/> </ Div>
form and my form located in content / collectedinfomail:
{* DO NOT EDIT THIS FILE! Use template override INSTEAD year. *} {Set-block scope = root variable = subject} {"Information Collected from % 1 "| i18n ('design / standard / content / edit", array ($ collection.object.name | wa ))}{/ sh set-block} {* Use this line to Specify The Email In The template, can read this from The Object to make it dynamic form pr {Set-block scope = root variable = email_receiver kalulambi_didi@yahoo.fr} {/ set-block} {Append-block scope = root variable = email_cc_receivers dkalulambi@tikdem.com} {/ append-block} *} {* Set this to redirect to Another Node {Set-block scope = root variable = redirect_to_node_id} 2 {/ set-block} *} {"WAS THE FOLLOWING Information Collected "| i18n ('design / standard / content / edit"} {Section name = loop = $ Attribute} collection.attributes {$ Attribute: item.contentclass_attribute_name | wash} {View = info attribute attribute_result_gui = $ Attribute: item} {/ Section}
I do not get the message.
Jean-Luc Nguyen
Thursday 28 October 2010 7:40:44 am
Hi,
At first sight, I guess your email should not be inside set-block tag, but like {set-block}your_email{/set-block}
http://www.acidre.com
Christian Rößler
Thursday 28 October 2010 2:43:36 pm
{set-block scope=root variable=email_receiver}receiver@example.com{/set-block}
This should it be. I currently don't know whether it is ok to mix upper and lowercase in template-statements (Set-block vs. set-block), so make sure to write it in lowercase only. I remember a nice tutotial by paul wilson on creating forms and sending mails. Search for "Paul wilson tutorial" and you will find it. This helps me a lot to understand the process of collected informations, forms, emails and stuff.
Cheers,
Chris
Hannover, Germany eZ-Certified http://auth.ez.no/certification/verify/395613