Forum for discussing general topics related to Couch.
2 posts Page 1 of 1
I am trying to add an additional line to the config file for different emails. For example in the config file for emails, I would like to add two more define statements as shown below (highlighted).

Then in my comments form I can then change <cms:send_mail from=k_email_from_sales to=k_email_to_2 subject='Comment Posted'>
</cms:send_mail>

Would this work?

The reason why I want to define additional emails is so that different databound forms for each department can have their respective emails targeted for them.

Thanks.

// 13.
// Your Email address. Will be used in contact forms.
define( 'K_EMAIL_TO', 'person_1@domain.com' );

// 14.
// Will be used as the sender of messages delivered by contact forms to the address above.
define( 'K_EMAIL_FROM', 'admin@domain.com' );

// 13_b.
// Your Email address. Will be used in contact forms.
define( 'K_EMAIL_TO_2', 'person_2@domain.com' );

// 14_b.
// Will be used as the sender of messages delivered by contact forms to the address above.
define( 'K_EMAIL_FROM_SALES', 'sales@domain.com' );
Harris wrote: each department can have their respective emails targeted for them

Isn't it best have as a manageable option in some global template in backend? Editing a config file manually is supposed to be a one-time thing.. apart from the fact k_email_from_sale/k_email_to_2 won't be recognized just after definition (you maybe already tried and it failed).

To save you some time, the tag fetching an editable 'email_sales' from a supposed non-clonable template globals.php would then look like -
Code: Select all
<cms:set my_email_from_sales = "<cms:get_field 'email_sales' masterpage='globals.php' />" scope='global' />
<cms:send_mail from=my_email_from_sales ...


Also to mention, Sales Dpt might request a secondary email to be used as a backup, so it would make sense to craft a repeatable region with potentially unlimited number of emails.. This part I leave to you to figure out.
unlimited time premium coding support per project - PM or email me or discuss in topic
active topics
2 posts Page 1 of 1

Who is online

In total there are 5 users online :: 0 registered, 0 hidden and 5 guests
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 5 guests