Forums / Developer / Tip a friend : problem with sender email
Anthony M.
Friday 21 November 2008 2:16:14 am
Hi,
i would like to modify the sender email when i send the form 'tip a friend'.i modified the file 'design/mysiteaccess/templates/content/tipafriendmail.tpl' like this :
{set-block scope=root variable=email_receiver}{ezini('receiver','mail_contact', 'myconfig.ini')}{/set-block} {set-block scope=root variable=subject}test subject{/set-block} {set-block scope=root variable=email_sender}{ezini('sender','mail_sender', 'myconfig')}{/set-block}
but it's always the email sender which is sent with the form...
Can you help me please ?
Thanks a lot
Anthony
Stéphane Bullier
Friday 21 November 2008 10:43:17 am
Hello,
You have to use the field "ReceiversEmail" into the form :
<form action={"/content/tipafriend/"|ezurl} method="post"> <div class="block"> <label>{"Your name"|i18n("design/ezwebin/content/tipafriend")}</label><div class="labelbreak"></div> <input class="box" type="text" size="40" name="YourName" value="{$your_name|wash}" /> </div> <div class="block"> <label>{"Your email address"|i18n("design/ezwebin/content/tipafriend")}</label><div class="labelbreak"></div> <input class="box" type="text" size="40" name="YourEmail" value="{$your_email|wash}" /> </div> <div class="block"> <label>{"Recipient's email address"|i18n("design/ezwebin/content/tipafriend")}</label><div class="labelbreak"></div> <input class="box" type="text" size="40" name="ReceiversEmail" value="{$receivers_email|wash}" /> </div> <div class="block"> <label>{"Comment"|i18n("design/ezwebin/content/tipafriend")}</label><div class="labelbreak"></div> <textarea class="box" cols="40" rows="10" name="Comment">{$comment|wash}</textarea> </div> <div class="buttonblock"> <input class="button" type="submit" name="SendButton" value="{'Send'|i18n('design/ezwebin/content/tipafriend')}" /> <input class="button" type="submit" name="CancelButton" value="{'Cancel'|i18n('design/ezwebin/content/tipafriend')}" /> </div> <input type="hidden" name="NodeID" value="{$node_id}" /> </form>
Stéphane