tomjung09 Posted May 16, 2009 Share Posted May 16, 2009 Okay, I can't figure this one out... I am sending 3 different emails from one page. I am trying to get the first two to work. This is the code for the first email sent: //send email to user that was outbid $to = $outbid_user; $from_header = "SalvagedRides.com"; $subject = "You have been outbid!"; $contents = "You have been outbid on the " . $title . "motorcyle. To bid on this bike again you can follow this link: http://www.salvagedrides.com/usa/home.php?innerframe=bike.php?id=" . $id . " \n\n Thank you for choosing SalvagedRides \n\n -The SalvagedRides Team"; ini_set('sendmail_from', 'postmaster@salvagedrides.com'); if(mail($to, $subject, $contents, $from_header)){echo "Mail sent to outbid user";} This email will send, the second one however, no dice: //send email to current high bidder $to_high = $userArray['email']; $from_header_high = "SalvagedRides.com"; $subject_high = "You have been outbid!"; $contents_high = "You are the current high bidder on the " . $title . "motorcyle. We will notify you if you are outbid. Meanwhile, to check on the status of this bike, you can follow this link: http://www.salvagedrides.com/usa/home.php?innerframe=bike.php?id=" . $id . " \n\n Thank you for choosing SalvagedRides \n\n -The SalvagedRides Team"; ini_set('sendmail_from', 'postmaster@salvagedrides.com'); if(mail($to_high, $subject_high, $contents_high, $from_header_high)){echo "Mail sent to highbid user";} It hangs up, since this code is before the header, nothing loads and the second email never sends. Any idea why? I have checked the $to_high it is filled correctly. Quote Link to comment Share on other sites More sharing options...
tomjung09 Posted May 16, 2009 Author Share Posted May 16, 2009 Man I am good, apparently having multiple ini_set('sendmail_from', 'postmaster@salvagedrides.com'); statements causes a problem. Peace, love, and good times! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.