Jump to content


Photo

Won't Email


  • Please log in to reply
4 replies to this topic

#1 usadarts

usadarts
  • Members
  • PipPipPip
  • Advanced Member
  • 64 posts
  • LocationLaurence Harbor, NJ

Posted 11 April 2006 - 06:23 PM

The code below looks simple enough to me, but emails are not being received.

<?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; David@USADarts.com", "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: $quantity

Sub Total: $subtotal 
Quantity Discount: $qtydisc

Grand Total: $grandtot

", "From: $sender");

?>


Thanks,
David

#2 usadarts

usadarts
  • Members
  • PipPipPip
  • Advanced Member
  • 64 posts
  • LocationLaurence Harbor, NJ

Posted 11 April 2006 - 08:07 PM

Any ideas?

<?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']."; DavidH@outerstuff.com";  
     $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: $quantity

Sub Total: $subtotal
Quantity Discount: $qtydisc

Grand Total: $grandtot

", "From: $sender");

?>


#3 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 11 April 2006 - 08:12 PM

The variable $sender should contain a valid email address. In you script it doesn't.

Try makeing the value something like this:
<?php $sender = "Beach Blast T-Shirts <valid@email.goes.here>\n"; ?>

Ken

#4 usadarts

usadarts
  • Members
  • PipPipPip
  • Advanced Member
  • 64 posts
  • LocationLaurence Harbor, NJ

Posted 11 April 2006 - 08:48 PM

Still does not work.

<?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 = "Webmaster@USADarts.com";
     
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-56

Total Quantity Ordered: $quantity

Sub Total: $subtotal
Quantity Discount: $qtydisc

Grand Total: $grandtot

", "From: $sender");

?>


#5 usadarts

usadarts
  • Members
  • PipPipPip
  • Advanced Member
  • 64 posts
  • LocationLaurence Harbor, NJ

Posted 11 April 2006 - 10:04 PM

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?

Thanks
David





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users