|
-
associate
mail() sends twice!
I haven't been able to figure this out. I think it must have something to do with how the script is called, but I don't know.... I have looked over every line and it still baffles me.
This script sends the form data submitted just fine, but it also sends a blank empty form as well, from unknown sender.
I have abbreviated some of it here, just to see how it is set up.
form is submitted to a php page with the following:
at the top is an include file containing the function..
PHP Code:
<?php
include("scripts/send_app.php");
send_lawapp($_POST);
?>
the include file is a pretty basic function...
PHP Code:
function send_lawapp($appData){
// collect application into vars
$fullname = $appData["FullName"];
$address1 = $appData["Address1"];
$address2 = $appData["Address2"];
$city = $appData["City"];
$state = $appData["State"];
$zip = $appData["ZipCode"];
$email = $appData["email"];
$dob = $appData ["DateofBirth"];
$hphone = $appData["HomePhone"];
$wphone = $appData["WorkPhone"];
$cphone = $appData["MobilePhone"];
// Just formats all of the $appData here....
// I don't think the problem is here,
// because I have tried simply $app = "test"
// and it still sends duplicate messages...
$app1 = "test";
$subject = "mywebsite.com - Online Application";
$headers = 'MIME-Version: 1.0' . "\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\n";
$headers .= 'From: ' . $fullname . '<' . $email . '>' . "\n";
mail("[email protected]", $subject, $app1, $headers);
}
so it sends 2 emails always! 1 is blank (contains no submitted data) from unknown the other is fine.
anyone have any idea where my problem might be?
Thanks.
-
Hi,
any chance you do a loadvariables(num) POST to send the data and then another one with GET hoping to see a response?
If not, please post an url to look at
Musicman
-
associate
no chance... it's html only...
url?
If it helps...
http://moneyforlawsuits.com/apply.htm
and here is both files... I am at my wits end... really the client doesn't mind, but it's bothersome.
ahhh nevermind, can't upload .php files.
I will convert to .txt and upload if you want to see it.
-
associate
Here is the actual include file...
-
associate
You know what? This client has their own external mailserver that I have assigned to their MX record. Maybe that has something to do with it?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|