zoukankan      html  css  js  c++  java
  • php原生发送邮件

    <?php
    session_start();
    $header="MIME-Version: 1.0".PHP_EOL;

    $header.="From:Hertz-UTS@uts.edu.au".PHP_EOL;

    $header.="Content-Type:text/html;charset=utf-8".PHP_EOL;
    $address=$_POST['email'];
    $subject='Thanks for shoping';

    $message="<html>".$_POST['lname']." ".$_POST['fname'].":<br/> Thanks for renting cars from Hertz-Uts,the
    costs is"." ".$_POST['cost'].".</br>Details are as follows:<br/>";
    //echo $message;
    $carArray = simplexml_load_file("carr.xml") or die("failed");
    foreach($_SESSION['car'] as $key=>$i) {
    foreach($carArray->children() as $c){
    if ($c->Model == $i){


    $year = $c->ModelYear;
    $m=$c->Mileage;
    $type=$c->FuelType;
    $seats=$c->Seats;
    $des=$c->Description;
    $price = $c->PricePerDay;
    $brand = $c->Brand;
    $model=$c->Model;






    }
    $title = $year."-".$brand."-".$i;
    $img="pic/".$model.'.jpg';

    }
    $tian=$_SESSION['day'][$key];
    $message= $message."model:$title</br>mileage:$m kms</br>fuel_type:$type</br>seats:$seats<br/>price_per_day:$price<br>
    rent_days:$tian<br/>description:$des<br></html>";




    }
    $txt = wordwrap($message,70);
    echo $txt;
    mail($address,$subject,$txt,$header);
    ?>

  • 相关阅读:
    CSS常用记录
    CSS字体图标使用方式
    CSS之多个div一行排列
    Mysql MVCC原理和幻读解决
    第8章 管理还原数据
    第20章 数据的移动
    oracle恢复删除的数据
    第11章 索引的管理与维护
    第10章 管理表
    第19章 归档模式下的数据库恢复
  • 原文地址:https://www.cnblogs.com/F4natasy/p/10950795.html
Copyright © 2011-2022 走看看