I had a guy create me a PHP mailer. I have embedded it into a website I am working on:
I get this error when the form is submitted:
Warning: mail() [function.mail]: Bad parameters to mail() function, mail not sent. in /home/content/j/u/m/jumpinjack/html/form/attach_mailer_class.php on line 186
Error while sending you mail.
The host is GoDaddy.
The form works fine on my personal host JustHost.
Does anyone know what the problem might be?
CODE:
[hr]
Billing / Shipping Information
Miscellaneous Info
';
$my_mail = new attach_mailer($name , $from , $to, $cc , $bcc, $subject, $body);
if (isset($_FILES)) {
foreach ($_FILES as $key => $file) {
for($i = 0; $i < count($file['name']); $i++)
{
if(isset($file['tmp_name'][$i]) && $file['tmp_name'][$i] != '')
{
$my_upload = new file_upload;
$my_upload->extensions = array(".ai", ".eps", ".pdf", ".psd", ".jpg", ".jpeg");
$my_upload->rename_file = false;
$my_upload->upload_dir = $uploadpath;
$my_upload->the_temp_file = $file['tmp_name'][$i];
$my_upload->the_file = $file['name'][$i];
$my_upload->http_error = $file['error'][$i];
if ($my_upload->upload()) {
$full_path = $my_upload->upload_dir.$my_upload->file_copy;
$my_mail->create_attachment_part($full_path);
$my_upload->del_temp_file($full_path);
}
$msg .= $my_upload->show_error_string();
}
}
}
}
$my_mail->process_mail();
$msg .= $my_mail->get_msg_str();
echo $msg;
}
}
elseif(isset($_POST['cmd']) && $_POST['cmd'] == 'set_opts')
{
switch ($_POST['selected']) {
case '1\" Round':
$options = array('Select Back Button', 'Pin Back','Magnet Back','Zipper Pull');
break;
case '1.25\" Round':
$options = array('Select Back Button', 'Pin Back','Magnet Back','Zipper Pull');
break;
case '2.25\" Round':
$options = array('Select Back Button', 'Pin Back','Magnet Back', 'Bottle Opener', 'Bottle Opener With Key Ring');
break;
case '3\" Round':
$options = array('Select Back Button', 'Pin Back','Magnet Back');
break;
case '3.5\" Round':
$options = array('Select Back Button', 'Pin Back','Magnet Back');
break;
case '2x3\" Rectangle':
$options = array('Select Back Button', 'Pin Back','Magnet Back');
break;
case '3x2\" Vertical Rectangle':
$options = array('Select Back Button', 'Pin Back','Magnet Back');
break;
case '2x2 Square':
$options = array('Select Back Button', 'Pin Back','Magnet Back');
break;
case '2x2 Diamond':
$options = array('Select Back Button', 'Pin Back','Magnet Back');
break;
case 'Select Button Size':
$options = array('Select Back Button');
break;
}
echo json_encode(array('result' => $options));
}
?>
Bill To:
* First Name: | '.$_POST['fname'].' |
* Last Name: | '.$_POST['lname'].' |
Company: | '.$_POST['company'].' |
Address 1 | '.$_POST['add1'].' |
Address 2 | '.$_POST['add2'].' |
City: | '.$_POST['city'].' |
State: | '.$_POST['state'].' |
* Zip: | '.$_POST['zip'].' |
* Phone: | '.$_POST['phone'].' |
* Email: | '.$_POST['email'].' |
Ship To:
* First Name: | '.$_POST['fname2'].' |
* Last Name: | '.$_POST['lname2'].' |
Company: | '.$_POST['company2'].' |
Address 1 | '.$_POST['add12'].' |
Address 2 | '.$_POST['add22'].' |
City: | '.$_POST['city2'].' |
State: | '.$_POST['state2'].' |
* Zip: | '.$_POST['zip2'].' |
* Phone: | '.$_POST['phone2'].' |
* indicates required information
Order
Button Size | Quantity | Button Back |
* Product 1 | '.$_POST['size1'].' | '.$_POST['qty1'].' | '.$_POST['back1'].' | ||
Product 2 | '.$_POST['size2'].' | '.$_POST['qty2'].' | '.$_POST['back2'].' | ||
Product 3 | Product 2 | '.$_POST['size3'].' | '.$_POST['qty3'].' | '.$_POST['back3'].' | |
Product 4 | Product 2 | '.$_POST['size4'].' | '.$_POST['qty4'].' | '.$_POST['back4'].' |
*When do you need your order? | '.$_POST['month'].' | '.$_POST['days'].' |
Is this a Quote or an Order? | '.$_POST['saletype'].' | |
Have you ordered from us before? | '.$_POST['prevorder'].' | |
Comments, questions, special instructions: | ||
'.$_POST['comments'].' |