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', '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.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.