CC in contact forms

Author Message

Norman Leutner

Monday 20 March 2006 5:04:51 am

Is there a way to define a cc within the email template /collectedinfomail/form.tpl like:

{set-block scope=root variable=email_receiver}receiver@test.com{/set-block}

{set-block scope=root variable=email_cc}cc@test.com{/set-block}

Mit freundlichen Grüßen
Best regards

Norman Leutner

____________________________________________________________
eZ Publish Platinum Partner - http://www.all2e.com
http://ez.no/partners/worldwide_partners/all2e_gmbh

Łukasz Serwatka

Monday 20 March 2006 11:38:42 pm

Norman, look in to kernel/content/collectinformation.php you will need to extend this file and add need PHP code which read variable mail_cc and prepare cc $mail->addCc( $email, $name = false );

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

Norman Leutner

Tuesday 21 March 2006 1:53:37 am

Thanks Lukasz,

I added the following lines:

            $bccreceiver =& $tpl->variable( 'email_bcc' ); 
            
            if ( !$mail->validate( $bccreceiver ) )
            {
                $bccreceiver = $ini->variable( "InformationCollectionSettings", "BccEmailReceiver" );
                if ( !$bccreceiver )
                    $bccreceiver = $ini->variable( "MailSettings", "AdminEmail" );
            }            
            $mail->addBcc( $bccreceiver, $name = false );

So I may use

{set-block scope=root variable=email_bcc}n.leutner@all2e.com{/set-block}

within the template

or

[InformationCollectionSettings]
BccEmailReceiver=n.leutner@all2e.com

within the site.ini

Mit freundlichen Grüßen
Best regards

Norman Leutner

____________________________________________________________
eZ Publish Platinum Partner - http://www.all2e.com
http://ez.no/partners/worldwide_partners/all2e_gmbh

Łukasz Serwatka

Tuesday 21 March 2006 1:57:37 am

Maybe you could submit new enhancement? I think some else can need it too, so would be nice to have possibility send cc e-mails from contact us form.

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

Ronnie Garcia

Tuesday 21 March 2006 5:41:40 am

I added a patch against 3.7.4 and 3.6.6 there.
Feel free to use/abuse, comments are welcome.

http://ez.no/community/bugs/adding_bcc_and_cc_receivers_to_collected_info

Ronnie.

Daniele Nocentini

Tuesday 21 March 2006 6:11:32 am

I can specify multiple cc email address?

Antica Bottega Digitale srl
http://www.abd.it

Norman Leutner

Tuesday 21 March 2006 6:33:04 am

Yes if you use the patch, you can just use an array like:

{set-block scope=root variable=email_cc_receivers}{$receiversarray}{/set-block}

Mit freundlichen Grüßen
Best regards

Norman Leutner

____________________________________________________________
eZ Publish Platinum Partner - http://www.all2e.com
http://ez.no/partners/worldwide_partners/all2e_gmbh

Daniele Nocentini

Tuesday 21 March 2006 7:21:40 am

ok thanks.

I try the patch but doesn't works in ez 3.7.4.

Antica Bottega Digitale srl
http://www.abd.it

Paul Forsyth

Wednesday 22 March 2006 2:43:19 am

we have a multiemail datatype which gives you this.

would this be of interest? i can put onto pubsvn.

J-A Eberhard

Wednesday 22 March 2006 2:44:45 am

It will be good to have it on snv as this email problem is commojn to many of us.
Thanks Paul.

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

Paul Forsyth

Wednesday 22 March 2006 3:04:02 am

Ok, i'll try to get this out shortly.

Daniele Nocentini

Friday 24 March 2006 2:03:13 am

any news?!

Antica Bottega Digitale srl
http://www.abd.it

Marko Žmak

Tuesday 28 March 2006 12:05:23 pm

Will this multi-email datatype be available in some eZ release soon?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Norman Leutner

Tuesday 28 March 2006 12:17:12 pm

In my case it works without any problems.

Currentlly I don't know if this will be a feature of future ez versions.

Mit freundlichen Grüßen
Best regards

Norman Leutner

____________________________________________________________
eZ Publish Platinum Partner - http://www.all2e.com
http://ez.no/partners/worldwide_partners/all2e_gmbh

Daniele Nocentini

Monday 29 May 2006 7:35:08 am

I try the patch in ez 3.7.6 and work fine with a Bcc and Ccn email, but if I pass an array does not works.

my code:

{set-block scope=root variable=email_bcc_receivers}{def $array_multireceiver=array('email1@abd.it','email2@abd.it')}{/set-block}

Where is the problem?

Antica Bottega Digitale srl
http://www.abd.it

Christian Johansen

Tuesday 30 May 2006 9:48:53 am

I had problems sending to emails defined in an array as well.

Xavier Serna

Friday 15 December 2006 12:08:22 am

To send emails to an array of destinators, you need to create the array using the operator {append-block} instead of {set-block}.

See my comment at http://issues.ez.no/IssueView.php?Id=8009&ProjectId=3&Anchor=Comment250945

hope this helps!

--
Xavier Serna
eZ Publish Certified Developer
Departament de Software
Microblau S.L. - http://www.microblau.net
+34 937 466 205

Matthew Carroll

Thursday 17 May 2007 4:49:01 pm

Bump to encourage Paul to release the multi-email datatype :)

Thanks
Matthew

http://carroll.org.uk

Xavier Serna

Friday 18 May 2007 12:43:23 am

Hi all,

you can add cc or bcc receivers like this way:

{append-block scope=root variable=email_cc_receivers}receiver1@domain.com{/append-block}
{append-block scope=root variable=email_cc_receivers}receiver2@domain.com{/append-block}

You can also use variable=email_bcc_receivers to add bcc receivers.

hth!

--
Xavier Serna
eZ Publish Certified Developer
Departament de Software
Microblau S.L. - http://www.microblau.net
+34 937 466 205

Paul Forsyth

Friday 18 May 2007 7:22:13 am

Hi Mathew, Xavier,

Its been a while hasnt it ;)

I need to review this since eZ have made it easier to add in multiple cc's in recent releases. Some of it depends on whether you want the user to enter the info from object level, template level, or tie the new fields through a combination of the two.

So, i will examine what is useful now and get back to you.

Paul

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 18:32:02
Script start
Timing: Jan 18 2025 18:32:02
Module start 'layout'
Timing: Jan 18 2025 18:32:02
Module start 'content'
Timing: Jan 18 2025 18:32:03
Module end 'content'
Timing: Jan 18 2025 18:32:03
Script end

Main resources:

Total runtime0.9927 sec
Peak memory usage4,096.0000 KB
Database Queries142

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0060 587.9063152.6250
Module start 'layout' 0.00600.0034 740.531339.4297
Module start 'content' 0.00940.9816 779.96091,058.7266
Module end 'content' 0.99110.0016 1,838.687536.1875
Script end 0.9927  1,874.8750 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.3491160.0002
Check MTime0.00130.1282160.0001
Mysql Total
Database connection0.00110.107010.0011
Mysqli_queries0.872187.85261420.0061
Looping result0.00150.14961400.0000
Template Total0.959096.620.4795
Template load0.00220.218020.0011
Template processing0.956896.378020.4784
Template load and register function0.00010.012510.0001
states
state_id_array0.00090.089210.0009
state_identifier_array0.00120.121620.0006
Override
Cache load0.00210.2108890.0000
Sytem overhead
Fetch class attribute can translate value0.00070.0743100.0001
Fetch class attribute name0.00120.1213270.0000
XML
Image XML parsing0.00420.4185100.0004
class_abstraction
Instantiating content class attribute0.00010.0063350.0000
General
dbfile0.00200.2011560.0000
String conversion0.00000.001040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
15content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
20content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
26content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
7content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 73
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs