如何更改SMTP

时间:2016-01-08 13:02:54

标签: php paypal-ipn

 $headers = "From: reservation@speedypark.co.uk \r\n";
          $headers .= "Reply-To: reservation@speedypark.co.uk \r\n";
          $headers .= "MIME-Version: 1.0\r\n";
          $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
          mail($to, $subject, $message, $headers);

          $sql9=mysql_query("SELECT * FROM `carparks_accounts` WHERE `cpid`='".$row1['cpid']."'");
          $row9=mysql_fetch_assoc($sql9);
          $to2      = $row9['email'];
          $subject2 = "New Airport Parking Booking Confirmation";
          $message2 .= "<p>Your car park has received a new booking through SpeedyPark.</p>";
          $message2 .= "<p>Booking ID: <b>".$bid."</b></p>";
          $message2 .= "<p>Name: <b>".$row2['fname']." ".$row2['sname']."</b></p>";
          $message2 .= "<p>Drop Off Dates: <b>".date('d/m/Y', $row1['sdate'])." - ".$row1['stime']."</b></p>";
          $message2 .= "<p>Pick Up Dates: <b>".date('d/m/Y', $row1['edate'])." - ".$row1['etime']."</b></p>";
          $message2 .= "<p>Outbound Flight: <b>Terminal ".$row8['terminalout']." - Flight ".$row8['flightout']."</b></p>";
          $message2 .= "<p>Return Flight: <b>Terminal ".$row8['terminalin']." - Flight ".$row8['flightin']."</b></p>";
          $message2 .= "<p>Price: <b>".$row1['price']."</b></p>";
          $message2 .= "<p>Vehicle: <b>".$row4['reg']." - ".$row4['make']." ".$row4['model']." - ".$row4['colour']."</b></p>";
          if ($row1['cpeid'] == "") {
          } else {
            $message2 .= "<h3>Extras</h3>";
            $extralist = explode(', ', $row1['cpeid']);
            foreach($extralist as $value) //loop over values
            { 
            $sql17 = mysql_query("SELECT * FROM `carparks_extras` WHERE `id`='".$value."'");
            $row17 = mysql_fetch_assoc($sql7);
              $message2 .= $row17['name']."<br/>";
            }
          }
          $headers2 = "From: reservation@speedypark.co.uk \r\n";
          $headers2 .= "Reply-To: reservation@speedypark.co.uk \r\n";
          $headers2 .= "MIME-Version: 1.0\r\n";
          $headers2 .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
          mail($to2, $subject2, $message2, $headers2);
          $sql6 = "UPDATE `bookings` SET `status`='confirmed' WHERE `id`='".$bid."'";
          $results1 = mysql_query($sql6);

我有一个ipn.php无法正常工作,因为服务器被列入黑名单,可能是代码中的另一个错误。是否可以将其更改为通过smtp设置发送?它通过mysql加载字符串。

0 个答案:

没有答案