PHP Mailer Error

I had a guy create me a PHP mailer. I have embedded it into a website I am working on:

www.jjbuttons.com/order.html

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]

<?php if(isset($_POST['cmd']) && ($_POST['cmd'] == 'complete')) { if(isset($_POST['completeorder'])) { //UPDATE THESE VARIABLES $to = '[email protected]'; // TODO: Change to your desired email. $cc = ""; //OPTIONAL $bcc = ""; //OPTIONAL $subject = 'Order Form Submission'; //TODO: Update to a subject for the email that you like $uploadpath = $_SERVER['DOCUMENT_ROOT']."/files/mail/"; //TODO: Change path to match your environment $max_size = 1024*2; //TODO: Update the max. size for uploading in kbs require($_SERVER['DOCUMENT_ROOT']."/form/attach_mailer_class.php"); //TODO: Change path to match your environment include ($_SERVER['DOCUMENT_ROOT']."/form/upload_class.php"); //TODO: Change path to match your environment //EDITTING BELOW THIS SHOULD NOT BE NECESSARY $name = $_POST['fname'] . ' ' . $_POST['lname']; $from = $_POST['email']; $msg = ""; $body =' Untitled Document .rounded_corners { border-radius: 15px; -moz-border-radius: 15px; } fieldset { margin:10px auto; } #commentForm label.error, #commentForm input.submit { margin-left: 10px; }
Billing / Shipping Information
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
'; if(isset($_POST['size2']) && isset($_POST['qty2']) && isset($_POST['back2'])) { $body .= ''; } if(isset($_POST['size3']) && isset($_POST['qty3']) && isset($_POST['back3'])) { $body .= ''; } if(isset($_POST['size4']) && isset($_POST['qty4']) && isset($_POST['back4'])) { $body .= ''; } $body .= '
* 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'].'
Miscellaneous Info
*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'].'
'; $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)); } ?>
Sponsor our Newsletter | Privacy Policy | Terms of Service