How to use different email addresses?

2 replies · opened May 12, 2019

EeumedMay 12, 2019

Hello,

I would like to use a contact form like the one in index-onepage.html with different email addresses for each service. I have read this:
https://themeforest.net/comments/13997002
but it don't work for me in form.php.
Do you have any suggestions?
Many thanks

SSemicolon WebSTAFFMay 12, 2019

Hello,

Find the following code in the include/form.php File:

$toemails[] = array(
				'email' => 'your-email@website.com', // Your Email Address
				'name' => 'Your Name' // Your Name
			);

and replace it with:

if( $_POST['template-contactform-services'] == 'service-1' ) {
	$toemails[] = array(
					'email' => 'your-email@website.com', // Your Email Address
					'name' => 'Your Name' // Your Name
				);
} elseif( $_POST['template-contactform-services'] == 'service-2' ) {
	$toemails[] = array(
					'email' => 'your-email@website.com', // Your Email Address
					'name' => 'Your Name' // Your Name
				);
} else {
	$toemails[] = array(
					'email' => 'your-email@website.com', // Your Email Address
					'name' => 'Your Name' // Your Name
				);
}

This should definitely work fine. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

EeumedMay 13, 2019

Hello,

It works fine!
Thank you

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard