Jump to content

[SOLVED] email won't send


tomjung09

Recommended Posts

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', '[email protected]');
   	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', '[email protected]');
   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.

 

Link to comment
https://forums.phpfreaks.com/topic/158408-solved-email-wont-send/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.