Ffico1970Jul 19, 2016
Hi,
can you help me please to make the contact form work to send message to specific department/email based on dropdown ?
link : http://graficonet.net/smooth/contact.html
Regards,
rafik
1 reply · opened Jul 19, 2016
Hi,
can you help me please to make the contact form work to send message to specific department/email based on dropdown ?
link : http://graficonet.net/smooth/contact.html
Regards,
rafik
Hello,
This is Definitely Possible. Consider using the following Code in the include/sendemail.php File:
$department = isset( $_POST['template-contactform-department'] ) ? $_POST['template-contactform-department'] : '';
if( $department == 'Department 1' ) {
$toemails[0] = array(
'email' => 'department1@website.com', // Your Email Address
'name' => 'Department 1' // Your Name
);
} elseif( $department == 'Department 2' ) {
$toemails[0] = array(
'email' => 'department2@website.com', // Your Email Address
'name' => 'Department 2' // Your Name
);
{
$toemails[0] = array(
'email' => 'default@website.com', // Your Email Address
'name' => 'Default' // Your Name
);
}This will definitely work fine. Let us know if we can help you with anything else or if you find any further issues.
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