本文整理汇总了PHP中model::send_mail方法的典型用法代码示例。如果您正苦于以下问题:PHP model::send_mail方法的具体用法?PHP model::send_mail怎么用?PHP model::send_mail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类model
的用法示例。
在下文中一共展示了model::send_mail方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: model
<?php
include 'model.php';
$obj = new model();
header('Content-type: application/json');
$conn = $obj->database();
$name = $_REQUEST['name'];
$email = $_REQUEST['email'];
$message = $_REQUEST['message'];
$var1 = $obj->contact_us($conn, $name, $email, $message);
$conf = $obj->send_mail($name, $email, $message, '', '', '', '');
if ($var1 == 1) {
$obj->mail_for_client_cont($name, $email, $message);
$data = array('status' => 200, 'message' => "Thank you! Your message has been successfully sent. We will contact you very soon!");
echo json_encode($data);
} else {
$data = array('status' => 400, 'message' => "Not submitted successfully!");
echo json_encode($data);
// echo json_encode("error");
}
示例2: model
<?php
include 'model.php';
$obj = new model();
header('Content-type: application/json');
$conn = $obj->database();
$name = $_POST['s_name'];
$company_name = $_POST['s_company_name'];
$email = $_POST['s_email'];
$phone = $_POST['s_phone'];
$web = $_POST['s_website'];
$assistance = $_POST['s_preferance'];
$message = $_POST['s_message'];
$conf = $obj->support($name, $company_name, $email, $phone, $web, $assistance, $message, $conn);
$conf = $obj->send_mail($name, $email, $message, $assistance, $company_name, $phone, $web);
if ($conf == 'done') {
$data = array('status' => 200, 'message' => "Your query has been sent successfully. We will contact you very soon.");
echo json_encode($data);
} else {
$data = array('status' => 400, 'message' => "Your query Not submitted successfully.");
echo json_encode($data);
}
示例3: model
<?php
include 'model.php';
$obj = new model();
header('Content-type: application/json');
$conn = $obj->database();
$name = $_POST['name'];
$email = $_POST['email'];
$contact = $_POST['contact'];
$conf = $obj->buy($name, $email, $contact, $conn);
if ($conf == 1) {
//$obj->mail_for_client_enq($name,$email,$message);
$obj->send_mail($name, $email, '', '', 'templates_buy_REQUEST', $contact, '');
$data = array('status' => 200, 'message' => 'Our Customer representative contact you shortly');
echo json_encode($data);
} else {
$data = array('status' => 400, 'message' => 'Your query Not submitted successfully');
echo json_encode($data);
}