eZ Community » Forums » Setup & design » CC in contact forms
expandshrink

CC in contact forms

CC in contact forms

Monday 20 March 2006 2:04:51 pm - 19 replies

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}

Tuesday 21 March 2006 8:38:42 am

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 );

Modified on Tuesday 21 March 2006 8:45:08 am by Ɓukasz Serwatka

Tuesday 21 March 2006 10: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

Tuesday 21 March 2006 10: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.

Tuesday 21 March 2006 2:41:40 pm

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/addin...c_and_cc_receivers_to_collected_info

Ronnie.

Modified on Tuesday 21 March 2006 2:42:21 pm by Ronnie Garcia

Tuesday 21 March 2006 3:11:32 pm

I can specify multiple cc email address?

Modified on Friday 24 March 2006 11:16:03 am by Daniele Nocentini

Tuesday 21 March 2006 3:33:04 pm

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

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

Tuesday 21 March 2006 4:21:40 pm

ok thanks.

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

Wednesday 22 March 2006 11:43:19 am

we have a multiemail datatype which gives you this.

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

Wednesday 22 March 2006 11:44:45 am

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

Wednesday 22 March 2006 12:04:02 pm

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

Friday 24 March 2006 11:03:13 am

any news?!

Tuesday 28 March 2006 10:05:23 pm

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

Tuesday 28 March 2006 10: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.

Monday 29 May 2006 4:35:08 pm

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?

Tuesday 30 May 2006 6:48:53 pm

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

Friday 15 December 2006 9: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...ProjectId=3&Anchor=Comment250945

hope this helps!

Friday 18 May 2007 1:49:01 am

Bump to encourage Paul to release the multi-email datatype happy.gif Emoticon

Thanks
Matthew

Friday 18 May 2007 9: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!

Friday 18 May 2007 4:22:13 pm

Hi Mathew, Xavier,

Its been a while hasnt it blunk.gif Emoticon

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

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from