当前位置: 首页>>代码示例>>PHP>>正文


PHP email::send_email方法代码示例

本文整理汇总了PHP中email::send_email方法的典型用法代码示例。如果您正苦于以下问题:PHP email::send_email方法的具体用法?PHP email::send_email怎么用?PHP email::send_email使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在email的用法示例。


在下文中一共展示了email::send_email方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: distance

        $distance = new distance();
        $distance_utilisateur = $distance->distance_lineaire($id_evenement, $id_internaute, $dbh);
        //Tableau des variables pour la requête SQL.
        $array_variables = [":id_relation" => NULL, ":id_evenement" => $id_evenement, ":id_participant" => $id_internaute, ":distance" => $distance_utilisateur, ":commentaires" => " "];
        //Création de la requête SQL.
        $sql_inscription_prepare = "INSERT INTO `" . PREFIXE . "relations`(`id_relation`, `id_evenement`, `id_participant`,`distance`, `commentaire`) " . "VALUES (:id_relation,:id_evenement,:id_participant,:distance,:commentaires)";
        //Exécution de la requête.
        $resultat_inscription = $dbh->prepare($sql_inscription_prepare);
        try {
            $resultat_inscription->execute($array_variables);
            //Suppression de la variable qui permet l'inscription
            unset($_SESSION['inscription']);
            //Envoi de l'alerte par email.
            if ($envoi_alerte == 1) {
                $tableau_email = ["expediteur" => "Wigowiz - AddicTerra <wigowiz@addicterra.fr>", "destinataire" => $email_alerte, "sujet" => $LANG_mail_alerte, "message" => $LANG_mail_alerte_contenu];
                $email = new email();
                $email->send_email($tableau_email);
            }
            //Redirection vers la page permettant d'afficher la carte une fois inscrit.
            header("location:./index.php?a=carte&include=default&m=" . $_SESSION['evenement']['code']);
            //echo "inscrit";
        } catch (Exception $ex) {
            echo "échec <br />";
            echo $ex;
        }
    } else {
        header("location:./index.php?a=carte&include=default&m=" . $_SESSION['evenement']['code']);
    }
} else {
    header("location:./index.php?a=carte&include=default&m=" . $_SESSION['evenement']['code']);
}
开发者ID:phil6611,项目名称:wigowiz3,代码行数:31,代码来源:inscription.php

示例2: Seat

<?php

if (!isset($_SESSION)) {
    session_start();
}
include "classes/users.class.php";
include "classes/airport.class.php";
if (isset($_POST['go'])) {
    $message = " <div   style=background-image:url(images/ticket.jpg); width:959px;height:500px;><strong>Print ticket<strong>\n\t   <img input type=image src=images/print.png height=40px width=40px onClick=window.print()/>\n\t<form id=CheckOutForm action=survey.php method=post >\n\t<div style=margin-left:400px;>\n\t<tr><br/><br/><br/><br/>\n\t<strong><td>First Name</td></strong>\n\t<?\techo {$_POST['First_N']}\t?>\n\t</br>\n\t\n\t<strong><td>Last Name</td></strong>\n\t<?\techo {$_POST['Last_N']}\t?>\n\t</br>\n\t\n\t<strong><td>Email</td></strong>\n\t<?\techo {$_POST['email']}\t?>\n\t</br>\n\t\n\t<strong><td>Your Flight ID: </td></strong>\n\t<?\techo {$this_id}\t?>\n\t</br>\n\t\n\t<!-- ONLY DOES FOR 1 SEAT SELECTED -->\n\t<strong><td>Your Seat(s) ID: </td></strong>\n\t<?\techo {$_SESSION['seat_id']};\t?>\n\t</br>\n\t\n\t<strong><td>From: </td></strong>\n\t<? echo {$a}\t?>\n\t</br>\n\t\n\t<strong><td>TO: </td></strong>\n\t<? echo {$b}\t?>\n\t</br>\n\t\n\t<strong><td>Departure Time: </td></strong>\n\t<? echo {$d_date}\t?>\n\t</br>\n\t\n\t<strong><td>Arrival Time: </td></strong>\n\t<? echo {$a_date}\t?>\n\t</br>\n\t\n\t<button><input type=submit id =Sumbit class=button1 value=Take quick survey><button>\n\t\n\t</div>";
    $email = new email($_POST['email'], $message, "Password Recovery (GA)");
    $email->send_email();
}
$users = new users();
$num = trim($_SESSION['leave_ids']);
$id_array = explode("_", $num);
$this_id = $id_array[0];
$seat = $_SESSION['seat_id'];
$flight = $users->get_specific_flight($this_id);
$d_time = $flight[0]['e_depart_time'];
$a_time = $flight[0]['e_arrival_time'];
//echo $this_id;
$a = Airport::get_name_by_id($flight[0]['org_id'], $users);
$b = Airport::get_name_by_id($flight[0]['dest_id'], $users);
$d_date = date('M j, Y - g:ia', $d_time);
$a_date = date('M j, Y - g:ia', $a_time);
//$d_date = $_SESSION['d_time'];
//$a_date = $_SESSION['a_time'];
$record = array();
//$record['seat_id'] = $seat;
if (isset($_SESSION['leave_ids'])) {
    if (isset($_SESSION['loggedIn'])) {
开发者ID:NLP-Project,项目名称:GatorAirlines,代码行数:31,代码来源:Receipt.php


注:本文中的email::send_email方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。