Not passing variables thru to Mail

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
SheDesigns
Forum Commoner
Posts: 42
Joined: Tue Nov 18, 2008 9:51 am
Location: Buffalo, NY

Not passing variables thru to Mail

Post by SheDesigns »

Anyone have any idea why the variables aren't passing thru when mailed?

Code: Select all

 
$firstName = $_POST['firstName'];
$lastName = $_POST['lastName'];
$title = $_POST['title'];
$business = $_POST['business'];
$phoneNumber = $_POST['phoneNumber'];
$fax = $_POST['fax'];
$additionalPhoneNumber = $_POST['additionalPhoneNumber'];
$emailAddress = $_POST['emailAddress'];
$address1 = $_POST['address1'];
$city = $_POST['city'];
$zip = $_POST['zip'];
$state = $_POST['state'];
$bestTimeToCall = $_POST['bestTimeToCall'];
$businessType = $_POST['businessType'];
$industry = $_POST['industry'];
$annualSalesVolume = $_POST['annualSalesVolume'];
$creditCardProcessor = $_POST['creditCardProcessor'];
$currentProcessor = $_POST['currentProcessor'];
$mcvisaSalesVolume = $_POST['mcvisaSalesVolume'];
$acceptGiftCard = $_POST['acceptGiftCard'];
$acceptPinDebit = $_POST['acceptPinDebit'];
 
$message = "First Name - $firstName \r\n
Last Name - $lastName \r\n
Title - $title \r\n
Company - $business \r\n
Phone - $phoneNumber \r\n
Best Time to Call - $bestTimeToCall \r\n
Fax - $fax \r\n
Email - $emailAddress \r\n
Address - $address1 \r\n
$city, $state $zip \r\n \r\n
 
Company - $business \r\n
Business Type - $businessType \r\n
Industry - $industry \r\n
Annual Credit Card Sales Volume - $annualSalesVolume \r\n
Average Ticket Amount - $avgTicketAmt \r\n
High Ticket Amount - $hiTicketAmt \r\n
Current Processor - $currentProcessor \r\n
Accept Gift Gards - $acceptGiftCard \r\n
Accept PIN Debit - $acceptPinDebit \r\n";
 
$type_header = "";
$headers = "From: $emailAddress \r\n";
$headers .= "Content-type: text/plain; charset=US-ASCII \r\n";
$headers .= "Content-Transfer-Encoding: 7bit \r\n";
$headers .= "MIME-Version: 1.0 \r\n";
$sendto = "myemail@yahoo.com";
$subject = "Application Form";
mail($sendto, $subject, $message, $headers, $emailAddress);
 
Post Reply