Getting Dreamweaver Form2Mail sends emails to different recipients

Hi everyone,

I am struggling with the Form2Mail.php in the FOrm2Mail Adobe Dreamweaver Plugin.

I want to get the form to send the email to different recipients based on the option selected from the dropdown menu in the form.

Any help would be appreciated:)

Thank you
Jordan

As a general rule, Dreamweaver is bad. It bloats what you are trying to do with oversized prewritten code. It uses depricated code from 10 years ago as its standard. And its only real use is to see what your layout looks like when you are starting out.

Having said that, I have no familiarity with any plugins that it uses, but if I saw the code it would be easy enough to correct.

General description of how it would work,

[php]

<?php $recipients = array( 1 => "[email protected]", 2 => "[email protected]", 3 => "[email protected]", ); /* * checks if POST is defined. Also checks to see if the value sent is in the predefined array. * If the value exists, it has an email to send to, if not it does not send the email. */ if ( isset( $_POST['to']) ) { echo "

Are you sure you want to send an email to " . $recipients[ $_POST['to']] . "?

"; // your mail() function would go here. For your benefit, escape everything that you personally did // not create. As in the message, subject, the senders email, everything. } ?> Select who you want to send the email to: Sales Support Marketing
<input type="submit" name="submit" value="SEND">
[/php]
Sponsor our Newsletter | Privacy Policy | Terms of Service