usadarts Posted April 11, 2006 Share Posted April 11, 2006 The code below looks simple enough to me, but emails are not being received.[code]<?php $teamname = $_POST['teamname']; $address = $_POST['address']; $city = $_POST['city']; $state = $_POST['state']; $zip = $_POST['zip']; $coach = $_POST['coach']; $phone = $_POST['phone']; $email = $_POST['email']; $ym = $_POST['ym']; $yl = $_POST['yl']; $as = $_POST['as']; $am = $_POST['am']; $al = $_POST['al']; $xl = $_POST['xl']; $xxl = $_POST['xxl']; $xxxl = $_POST['xxxl']; $quantity = $_POST['quantity']; $subtotal = $_POST['subtotal']; $qtydisc = $_POST['qtydisc']; $grandtot = $_POST['grandtot']; $sender = "Beach Blast T-Shirts";mail("$email; [email protected]", "Beach Blast T-Shrt Purchase Order Confirmation", "Order Confirmation:$teamname coached by $coach$address$city, $state $zip$phone$email$ym - Youth Medium (10-12) $yl - Youth Large (14-16) $as - Adult Small (34-36) $am - Adult Medium (38-40) $al - Adult Large (42-44) $xl - Adult XL (46-48) $xxl - Adult 2XL (50-52) $xxxl - Adult 3XL (54-56)Total Quantity Ordered: $quantitySub Total: $subtotal Quantity Discount: $qtydiscGrand Total: $grandtot", "From: $sender");?>[/code]Thanks,David Link to comment https://forums.phpfreaks.com/topic/7129-wont-email/ Share on other sites More sharing options...
usadarts Posted April 11, 2006 Author Share Posted April 11, 2006 Any ideas?[code]<?php $teamname = $_POST['teamname']; $address = $_POST['address']; $city = $_POST['city']; $state = $_POST['state']; $zip = $_POST['zip']; $coach = $_POST['coach']; $phone = $_POST['phone']; $email = $_POST['email']."; [email protected]"; $ym = $_POST['ym']; $yl = $_POST['yl']; $as = $_POST['as']; $am = $_POST['am']; $al = $_POST['al']; $xl = $_POST['xl']; $xxl = $_POST['xxl']; $xxxl = $_POST['xxxl']; $quantity = $_POST['quantity']; $subtotal = $_POST['subtotal']; $qtydisc = $_POST['qtydisc']; $grandtot = $_POST['grandtot']; $sender = "Beach Blast T-Shirts";mail($email, "Beach Blast T-Shrt Purchase Order Confirmation","Order Confirmation:$teamname coached by $coach$address$city, $state $zip$phone$email$ym - Youth Medium (10-12) $yl - Youth Large (14-16) $as - Adult Small (34-36) $am - Adult Medium (38-40) $al - Adult Large (42-44) $xl - Adult XL (46-48) $xxl - Adult 2XL (50-52) $xxxl - Adult 3XL (54-56)Total Quantity Ordered: $quantitySub Total: $subtotalQuantity Discount: $qtydiscGrand Total: $grandtot", "From: $sender");?>[/code] Link to comment https://forums.phpfreaks.com/topic/7129-wont-email/#findComment-25964 Share on other sites More sharing options...
kenrbnsn Posted April 11, 2006 Share Posted April 11, 2006 The variable $sender should contain a valid email address. In you script it doesn't.Try makeing the value something like this:[code]<?php $sender = "Beach Blast T-Shirts <[email protected]>\n"; ?>[/code]Ken Link to comment https://forums.phpfreaks.com/topic/7129-wont-email/#findComment-25969 Share on other sites More sharing options...
usadarts Posted April 11, 2006 Author Share Posted April 11, 2006 Still does not work.[code]<?php $teamname = $_POST['teamname']; $address = $_POST['address']; $city = $_POST['city']; $state = $_POST['state']; $zip = $_POST['zip']; $coach = $_POST['coach']; $phone = $_POST['phone']; $email = $_POST['email']; $ym = $_POST['ym']; $yl = $_POST['yl']; $as = $_POST['as']; $am = $_POST['am']; $al = $_POST['al']; $xl = $_POST['xl']; $xxl = $_POST['xxl']; $xxxl = $_POST['xxxl']; $quantity = $_POST['quantity']; $subtotal = $_POST['subtotal']; $qtydisc = $_POST['qtydisc']; $grandtot = $_POST['grandtot']; $sender = "[email protected]"; mail("$email", "Beach Blast T-Shirt Purchase Order Confirmation","Order Confirmation:$teamname coached by $coach$address$city, $state $zip$phone$email$ym - Youth Medium 10-12 $yl - Youth Large 14-16 $as - Adult Small 34-36 $am - Adult Medium 38-40 $al - Adult Large 42-44 $xl - Adult XL 46-48 $xxl - Adult 2XL 50-52 $xxxl - Adult 3XL 54-56Total Quantity Ordered: $quantitySub Total: $subtotalQuantity Discount: $qtydiscGrand Total: $grandtot", "From: $sender");?>[/code] Link to comment https://forums.phpfreaks.com/topic/7129-wont-email/#findComment-25977 Share on other sites More sharing options...
usadarts Posted April 11, 2006 Author Share Posted April 11, 2006 Found the problem...MidPhase does not allow the Mail Function as a default. They had to change the status to allow.Anyway, a quick question...how do I add second email address or a CC: address?ThanksDavid Link to comment https://forums.phpfreaks.com/topic/7129-wont-email/#findComment-26004 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.