Forums / Setup & design / CC in contact forms

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

eZ debug

Timing: Jan 18 2025 18:41:21
Script start
Timing: Jan 18 2025 18:41:21
Module start 'content'
Timing: Jan 18 2025 18:41:21
Module end 'content'
Timing: Jan 18 2025 18:41:22
Script end

Main resources:

Total runtime0.1491 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0057 589.1172180.8438
Module start 'content' 0.00570.0053 769.9609121.9609
Module end 'content' 0.01110.1380 891.9219549.8750
Script end 0.1491  1,441.7969 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00342.2649200.0002
Check MTime0.00130.8695200.0001
Mysql Total
Database connection0.00060.427810.0006
Mysqli_queries0.104770.20131410.0007
Looping result0.00161.05401390.0000
Template Total0.137792.310.1377
Template load0.00080.553810.0008
Template processing0.136991.784310.1369
Override
Cache load0.00060.396910.0006
Sytem overhead
Fetch class attribute can translate value0.00120.785110.0012
XML
Image XML parsing0.00020.165610.0002
General
dbfile0.00211.3961200.0001
String conversion0.00000.003230.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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