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.

eZ debug

Timing: Jan 18 2025 00:51:12
Script start
Timing: Jan 18 2025 00:51:12
Module start 'layout'
Timing: Jan 18 2025 00:51:12
Module start 'content'
Timing: Jan 18 2025 00:51:12
Module end 'content'
Timing: Jan 18 2025 00:51:12
Script end

Main resources:

Total runtime0.0201 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0080 589.4766152.6406
Module start 'layout' 0.00800.0044 742.117239.4922
Module start 'content' 0.01250.0055 781.609493.2734
Module end 'content' 0.01800.0021 874.882838.3047
Script end 0.0201  913.1875 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003115.4584140.0002
Check MTime0.00167.9544140.0001
Mysql Total
Database connection0.00105.079710.0010
Mysqli_queries0.004220.977830.0014
Looping result0.00000.114910.0000
Template Total0.00168.010.0016
Template load0.00094.269310.0009
Template processing0.00073.702910.0007
Override
Cache load0.00062.987210.0006
General
dbfile0.00031.689780.0000
String conversion0.00000.073540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs