Forums / Install & configuration / Problem with contact_us (email sender)

Problem with contact_us (email sender)

Author Message

Leonardo López

Wednesday 02 November 2005 6:05:23 am

Hello

Sorry if this was already discussed, but i havent found answer yet, a litle problem... when users send messages across the "contact_us" module, the email address of the sender is always the same (administrator email) how can i do to fix that?

(excuse my bad english)

Łukasz Serwatka

Tuesday 08 November 2005 11:52:11 pm

Hi Leonardo,

This is correct because, by default "Feedback form" is without "sender" text line attribute. You can add such new attribute to "Feedback form" class and add sender email.

Then in feedback_form.tpl add

{set-block scope=root variable=email_sender}{$object.data_map.sender.content}{/set-block}

Hope this will help.

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

J-A Eberhard

Wednesday 09 November 2005 1:05:30 pm

Hi Lukasz,

Have been looking for this for quite a while.

Would it be possible to use the feedback_form class attribute email instead of a newly created sender?

Which template do you add your code snippet?
/full/feedback_form.tpl or
/collectedinfomail/feedback_form.tpl
Thanks

Open Source Solution Provider
Open-Net Ltd Switzerland
http://www.open-net.ch

Łukasz Serwatka

Thursday 10 November 2005 1:01:34 am

Hi J-A,

This is possible, you will have to set

{set-block scope=root variable=email_sender}{$collection.attributes[2].data_text|wash}{/set-block}

in

/override/templates/collectedinfomail/feedback_form.tpl

If will not work, then set correct index [n] for $collection.attributes array which is valid for email. This will work for standard feedback_form

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

Leonardo López

Thursday 17 November 2005 6:29:32 am

Thanks a lot Lukasz!!!

I solve the problem modifying the archive "collectinformation.php" i just change the sender and put this line:
$sender=$user->attribute('email');
And it works good...

This archive is located in ../kernel/content