I’m pretty much a noob at the PHP stuff. I’m trying to use a form to send an email. However, I want the email to go to different addresses based on different values chosen in a drop down box.
Here’s the mailing code I’m working with but can’t make it happen:
//Sending Email recipient based on partner value
$the_header = "From: $submitted_byn"
. "Reply-To: $submitted_byn";
$the_subject = "Tax Department Assignment";
$the_message = "Submitted By: $submitted_byn"
. "Client Name: $client_namen"
. "Client Number: $client_numbern"
. "Partner: $partnern"
. "Date Assigned: $date_assignedn"
. "Due Date: $due_daten"
. "Detailed Description: $detailed_descriptionn";
if($partner = "Bill") {
$the_mail_to = "[email protected]";
}
elseif($partner = "Ernie") {
$the_mail_to = "[email protected]";
}
elseif($partner = "Joe") {
$the_mail_to = "[email protected]";
}
@mail($the_email_to, $the_subject ,$the_message ,$the_header ) ;
When I submit the form I do not get any errors, but I don’t get any emails either.
Can someone help me out with this? Thanks
[/code]