User confirmation email for collected information

Author Message

Jean-Luc Nguyen

Wednesday 28 April 2010 4:31:06 am

Hello,

When a user submits a collect information form, an email is sent to the admin email, but what is the best way to send a customized confirmation email to the user without hacking the kernel?

Thanks a lot!

http://www.acidre.com

Lars Eirik R

Wednesday 28 April 2010 5:40:11 am

Hi.

I have already done this. I actually use an extension called wrap operator. This allows you to register any php functions you need access to, such as the mail funciton.

In an include template which i have defined i include the code like this :

{def $mailreturn = wrap_php_func('mail', array($to,$subject,$message,$headers))}

The problem was that i needed to send different email content to the user and to the administration per collected info.

This approach allows me to send the mail from the template whenever a user has submitted the form.

- Lars Eirik

Jean-Luc Nguyen

Wednesday 28 April 2010 6:02:40 am

Yes, using an custom template operator will do the trick! Thanks a lot!

http://www.acidre.com

Nicolas Pastorino

Wednesday 28 April 2010 6:57:31 am

Hi Jean-Luc,

You may want to mark the topic as solved if you got an appropriate answer ( small ticker next to the topic's title, above )

Cheers,

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

Jean-Luc Nguyen

Wednesday 28 April 2010 8:52:41 am

Lars,

Thanks again, but how / where do you include this operator call? In /templates/content/collectedinfomail/form.tpl?

Thanks for your help.

http://www.acidre.com

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.