Sending Form data error
Posted: Wed Dec 06, 2006 8:06 am
feyd | Please use
I have the javascript commented out as I wasn't receiving the emails and I wanted to see the error come up.
Can anyone identify the problem here?
Thanks,
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hello all,
I'm using phpmailer to send form data via email
The following error occurs when the submit button is pressed:
Message could not be sent. Mailer Error: Language string failed to load: recipients_failedxxxxx@xxxxx.com
Here is the code:Code: Select all
<?php
$headers .= "Title: " . $_POST['requiredtitle'] . "\r\n";
$headers .= "First Name: " . $_POST['requiredfirst_name'] . "\r\n";
$headers .= "Last Name: " . $_POST['requiredlast_name'] . "\r\n";
$headers .= "Birth Date Day: " . $_POST['requiredBirthDate_dd'] . "\r\n";
$headers .= "Birth Date Month: " . $_POST['requiredBirthDate_mm'] . "\r\n";
$headers .= "Birth Date Year: " . $_POST['requiredBirthDate_yyyy'] . "\r\n";
$headers .= "Address: " . $_POST['requiredaddress'] . "\r\n";
$headers .= "Town/Suburb: " . $_POST['requiredtown_suburb'] . "\r\n";
$headers .= "State: " . $_POST['requiredCustState'] . "\r\n";
$headers .= "PostCode: " . $_POST['requiredpostcode'] . "\r\n";
$headers .= "How long at address: " . $_POST['How_Long_at_Address'] . "\r\n";
$headers .= "Email: " . $_POST['requiredemail'] . "\r\n";
$headers .= "Telephone: " . $_POST['requiredphone'] . "\r\n";
$headers .= "Mobile: " . $_POST['mobile'] . "\r\n";
$headers .= "Work Phone: " . $_POST['requiredwork_phone'] . "\r\n";
$headers .= "Found Us: " . $_POST['find'] . "\r\n";
$headers .= "Referred By: " . $_POST['referrer'] . "\r\n";
$headers .= "Other: " . $_POST['explain'] . "\r\n";
$headers .= "Outstanding Loan: " . $_POST['outstanding_loan'] . "\r\n";
$headers .= "Next of Kin Title: " . $_POST['requirednktitle'] . "\r\n";
$headers .= "Next of Kin First Name: " . $_POST['requirednk_firstname'] . "\r\n";
$headers .= "Next of Kin Last Name: " . $_POST['requirednk_lastname'] . "\r\n";
$headers .= "Next of Kin Relation: " . $_POST['requirednk_relation'] . "\r\n";
$headers .= "Next of Kin Telephone: " . $_POST['requirednk_phone'] . "\r\n";
$headers .= "Next of Kin Address: " . $_POST['requirednk_address'] . "\r\n";
$headers .= "Next of Kin State: " . $_POST['requirednk_state'] . "\r\n";
$headers .= "Next of Kin Postcode: " . $_POST['requirednk_postcode'] . "\r\n";
$headers .= "Document 1: " . $_POST['doc1'] . "\r\n";
$headers .= "Document 2: " . $_POST['doc2'] . "\r\n";
$headers .= "Document 3: " . $_POST['doc3'] . "\r\n";
$headers .= "Document 4: " . $_POST['doc4'] . "\r\n";
$headers .= "Total Points: " . $_POST['totalpoints'] . "\r\n";
$headers .= "Has License: " . $_POST['havelicense'] . "\r\n";
$headers .= "Employer Name: " . $_POST['requiredempname'] . "\r\n";
$headers .= "ABN: " . $_POST['requiredabn'] . "\r\n";
$headers .= "Employer Address: " . $_POST['requiredempaddress'] . "\r\n";
$headers .= "Employer Phone: " . $_POST['requiredempphone'] . "\r\n";
$headers .= "Employer Title: " . $_POST['emptitle'] . "\r\n";
$headers .= "Employer First Name: " . $_POST['empfirstname'] . "\r\n";
$headers .= "Employer Last Name: " . $_POST['emplastname'] . "\r\n";
$headers .= "Employment Length: " . $_POST['emplength'] . "\r\n";
$headers .= "Employment Level: " . $_POST['emplevel'] . "\r\n";
$headers .= "Net Income: " . $_POST['netincome'] . "\r\n";
$headers .= "Pay Rate: " . $_POST['payrate'] . "\r\n";
$headers .= "Pay Date Day: " . $_POST['PayDate_dd'] . "\r\n";
$headers .= "Pay Date Month: " . $_POST['PayDate_mm'] . "\r\n";
$headers .= "Pay Date Year: " . $_POST['PayDate_yyyy'] . "\r\n";
$headers .= "Financial Institution Name: " . $_POST['finame'] . "\r\n";
$headers .= "Financial Institution Branch: " . $_POST['fibranch'] . "\r\n";
$headers .= "Account Name: " . $_POST['accname'] . "\r\n";
$headers .= "BSB: " . $_POST['bsb'] . "\r\n";
$headers .= "Account Number: " . $_POST['accnum'] . "\r\n";
$headers .= "Credit Card Type: " . $_POST['cctype'] . "\r\n";
$headers .= "Credit Card Number: " . $_POST['ccnum'] . "\r\n";
$headers .= "Credit Card Batch: " . $_POST['ccbatch'] . "\r\n";
$headers .= "Credit Card Name: " . $_POST['ccname'] . "\r\n";
$headers .= "Credit Card Expiry Month: " . $_POST['CC_Expire_mm'] . "\r\n";
$headers .= "Credit Card Expiry Year: " . $_POST['CC_Expire_yyyy'] . "\r\n";
$headers .= "Bankrupt: " . $_POST['bankrupt'] . "\r\n";
$headers .= "Requested Loan Amount: " . $_POST['AmntLoanRqsted'] . "\r\n";
$headers .= "Loan Length: " . $_POST['loanlength'] . "\r\n";
$headers .= "Other Info: " . $_POST['other_info'] . "\r\n";
$headers .= "Terms: " . $_POST['requiredterms'] . "\r\n";
require("phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->Host = "MAIL.xxxxxx.COM";
$mail->SMTPAuth = true;
$mail->Username = "xxxxx@xxxxxx.com";
$mail->Password = "xxxxx";
$mail->From = "xxxx@xxxxx.com";
$mail->FromName = "xxxxxx.com";//optional from name
$mail->AddAddress("xxxxx@xxxxx.com", "xxxxxx");
$mail->WordWrap = 72;
//$mail->AddReplyTo("sender@example.com", "Information");
$mail->IsHTML(False); // set email format to HTML
$mail->Subject = "Application ";
$mail->Body = $headers;
if(!$mail->Send()) {
echo "Message could not be sent. <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
}
?>
<!--<script type="text/javascript">
window.location = "http://www.xxxxxx.com.au/thankyouapply.html"
</script> -->Can anyone identify the problem here?
Thanks,
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]