本文整理汇总了PHP中phpmailer::MsgHTML方法的典型用法代码示例。如果您正苦于以下问题:PHP phpmailer::MsgHTML方法的具体用法?PHP phpmailer::MsgHTML怎么用?PHP phpmailer::MsgHTML使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类phpmailer
的用法示例。
在下文中一共展示了phpmailer::MsgHTML方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sendQRmail
function sendQRmail($from, $to, $subject, $msg, $qrcodeImage, $cid, $name)
{
include_once 'inc/class.phpmailer.php';
$mail = new phpmailer();
$mail->SMTPDebug = 0;
// debugging: 1 = errors and messages, 2 = messages only, 0 = off
$mail->IsSMTP();
// Set mailer to use SMTP
$mail->Host = 'mailhub.eait.uq.edu.au';
// Specify server
$mail->Port = 25;
// Server port: 465 ssl OR 587 tls
//$mail->SMTPSecure = 'tls'; // Enable encryption, 'ssl' also accepted
$mail->SMTPAuth = false;
// Enable SMTP authentication
$mail->Username = 's4329663@student.uq.edu.au';
// SMTP username
$mail->Password = 'hongzhe123999';
// SMTP password
$mail->SetFrom($from, 'QRappi');
// Sender
$mail->AddReplyTo($from, 'Support');
// Set an alternative reply-to address
$mail->AddAddress($to, 'User');
// Set who the message is to be sent to
$mail->Subject = $subject;
// Set the subject line
// Prepares message for html (see doc for details http://phpmailer.worxware.com/?pg=tutorial)
$mail->MsgHTML($msg);
// Add the image to the email as an inline element (i.e. not as an attachment)
$mail->AddStringEmbeddedImage($qrcodeImage, $cid, $name);
// Send the message, check for errors
$ok = $mail->Send();
return $ok;
}
示例2: sendEmail
protected function sendEmail($to, $subject, $body)
{
include_once '../../libraries/phpmailer/class.phpmailer.php';
if (empty($to)) {
return false;
}
$mail = new phpmailer();
$mail->PluginDir = '../../libraries/phpmailer';
$mail->CharSet = 'UTF-8';
$mail->Subject = substr(stripslashes($subject), 0, 900);
$mail->From = 'noreply@arisgames.org';
$mail->FromName = 'ARIS Mailer';
$mail->AddAddress($to, 'ARIS Author');
$mail->MsgHTML($body);
$mail->WordWrap = 79;
if ($mail->Send()) {
return true;
} else {
return false;
}
}
示例3: phpmailer
<?php
/**
* Created by PhpStorm.
* User: Viry
* Date: 17/11/2015
* Time: 01:42 PM
*/
require_once '../mail/class.phpmailer.php';
require "../mail/class.smtp.php";
$mail = new phpmailer();
$mail->PluginDir = '../mail/';
$mail->SMTPSecure = "tls";
$mail->Host = "smtp.gmail.com";
$mail->SMTPAuth = true;
$mail->Username = "virysanm@gmail.com";
$mail->Password = "viry0704";
$mail->Port = 587;
//puerto de autenticacion que usa gmail
$mail->AddAddress("vsanmartin@plumidea.com");
$mail->IsHTML = true;
$mail->MsgHTML('Recuperacion de Contraseña <br><br> Contraseña: <br><br> Ingresa a este Link: http://proyectospi.com/PuntodeEncuentroP/html/pages/forgot-password.html <br><br>para Ingresar a tu sesion con la contraseña que te enviamos en este correo.');
$mail->SetFrom("virysanm@gmail.com", "Punto de Encuentro");
$mail > Subject == "Recuperacion de Contraseña";
//indico destinatario
$exito = $mail->Send();
if (!$exito) {
echo "Error al enviar: " . $mail > ErrorInfo;
} else {
echo "Mensaje enviado!";
}
示例4: foreach
function approve_pos($id)
{
if (isset($this->session->userdata['user'])) {
$pos = $_POST['pos'];
$has_superviser = false;
if ($this->session->userdata['user_type'] == 3) {
if ($this->has_store_superviser()) {
$has_superviser = true;
}
} else {
if ($this->has_user_superviser()) {
$has_superviser = true;
}
}
if ($has_superviser) {
foreach ($pos as $key => $item) {
$this->orders_model->add_pos($key, mysql_escape_string($item));
}
} else {
foreach ($pos as $key => $item) {
$this->orders_model->approve_pos($key, mysql_escape_string($item));
$verif_code = md5(time());
$this->status_model->insert($key, 0, $verif_code);
$mailer = new phpmailer();
$mailer->IsSendmail();
$mailer->From = 'noreply@domain.com';
$mailer->FromName = 'Belron admin';
$mailer->Subject = utf8_decode('Nouvelle commande ajoutée');
$email_message = "Une nouvelle commande vient d'être ajoutée <br/> \n Pour confirmer la receprion :<a href='" . base_url() . "orders/recieved/" . $key . "/" . $verif_code . "/'>" . base_url() . "orders/recieved/" . $key . "/" . $verif_code . "/ </a><br/>\n Pour confirmer le traitement :<a href='" . base_url() . "orders/submit/" . $key . "/" . $verif_code . "/'>" . base_url() . "orders/submit/" . $key . "/" . $verif_code . "/ </a><br/>\n Pour confirmer l'envoie :<a href='" . base_url() . "orders/send/" . $key . "/" . $verif_code . "/'>" . base_url() . "orders/send/" . $key . "/" . $verif_code . "/ </a>";
$mailer->MsgHTML($email_message);
$mailer->AddAddress('skander.jabouzi@groupimage.com', 'Skander Jabouzi');
$mailer->Send();
}
}
redirect('wishlist/confirmation/');
} else {
redirect('login/storelogin');
}
}
示例5: mailrestaurar
function mailrestaurar($email, $passnew)
{
require_once '../mail/class.phpmailer.php';
require "../mail/class.smtp.php";
$mail = new phpmailer();
$mail->PluginDir = '../mail/';
$mail->SMTPSecure = "tls";
$mail->Host = "smtp.gmail.com";
$mail->SMTPAuth = true;
$mail->Username = "virysanm@gmail.com";
$mail->Password = "viry0704";
$mail->Port = 587;
//puerto de autenticacion que usa gmail
$mail->AddAddress($email);
$mail->IsHTML = true;
$mail->MsgHTML('Recuperacion de Password <br><br> Punto de Encuentro te envia el siguiente Password, para que puedas entrar a tu usuario<br><br>Password: ' . $passnew . '<br><br> Ingresa a este Link: http://proyectospi.com/PuntodeEncuentroP/html/pages/changepassword.php <br><br>para Ingresar a tu sesion con la Password que te enviamos en este correo.');
$mail->SetFrom("virysanm@gmail.com", "Punto de Encuentro");
$mail > Subject == "Recuperacion de Password";
//indico destinatario
$exito = $mail->Send();
if (!$exito) {
echo "Error al enviar: " . $mail > ErrorInfo;
} else {
echo "Ok";
}
}
示例6: phpmailer
$email = $dd['email'];
$position = $dd['position'];
$nits_rec1 = new phpmailer();
$nits_rec1->IsSMTP();
$nits_rec1->SMTPAuth = "true";
$nits_rec1->SMTPDebug = 2;
$nits_rec1->IsHTML(true);
$nits_rec1->SMTPAuth = true;
$nits_rec1->Username = "recruitment@nits.ac.in";
//to change email id from sending
$nits_rec1->Password = "nits_rec@123";
//its password
$nits_rec1->SMTPSecure = 'tls';
$nits_rec1->From = "recruitment@nits.ac.in";
$nits_rec1->FromName = "NIT Silchar";
$nits_rec1->Subject = "Form submitted successfully.";
$nits_rec1->Host = "172.16.30.72";
// HOST SMTP OUT ADDRESS
$nits_rec1->Port = 587;
$body = "<html><head><link href='http://www.nits.ac.in/css/style.css' rel='stylesheet' type='text/css'/><link href='http://www.nits.ac.in/nits_rec/css/recruitment_form.css' rel='stylesheet' type='text/css'/><link href='http://old.nits.ac.in/nits_rec/css/final_form.css' rel='stylesheet' type='text/css'/><link href='http://fonts.googleapis.com/css?family=Marcellus' rel='stylesheet' type='text/css'><link href='http://fonts.googleapis.com/css?family=Ubuntu+Condensed' rel='stylesheet' type='text/css'></head><body><div id='wrapper' style='width:600px;'><div id='top' ><div id='logo' ><h1><a href='http://recruitment.nits.ac.in/non_faculty/index.php'>National Institute of Technology Silchar</a></h1></div></div>";
$body .= "THANK YOU for submitting your request for the position : " . $position . ", at National Institute of Technology, Silchar.<br /><br/><br/><b>Login & See your submitted form and print it out, <a href='http://recruitment.nits.ac.in/non_faculty/rlogin_a.php'>CLICK HERE</a></b></div></body>";
$nits_rec1->Mailer = "smtp";
$nits_rec1->Priority = '1';
$nits_rec1->MsgHTML($body);
$nits_rec1->AltBody = "THANK YOU for submitting your request for the faculty position : " . $position . ", at National Institute of Technology, Silchar.Login & See your submitted form and print it out, http://recruitment.nits.ac.in/non_faculty/rlogin_a.php";
$nits_rec1->AddAddress($email);
$nits_rec1->Encoding = "base64";
if (!$nits_rec1->Send()) {
echo "There has been a mail error sending to " . $email . "<br/>Error info : " . $nits_rec->ErrorInfo;
}
header("location:show_form.php");
示例7: Send
//.........这里部分代码省略.........
} else {
$y = 1;
}
// si se deseára configurar los parametros de el dominio
// y cuenta de correo default, aquí se recibirian los parámetros.
$port = $this->port;
$smtp_secure = $this->smtp_secure;
$auth = $this->auth;
$host = $this->host;
$username = $this->username;
$password = $this->password;
$mail = new phpmailer();
$mail->CharSet = 'UTF-8';
$mail->Mailer = "smtp";
$mail->IsSMTP();
ini_set('max_execution_time', 600);
$mail->SMTPAuth = true;
// si se indica un puerto este se utilizara,
// de lo contrario su usará el default.
if (empty($port)) {
$mail->Port = 465;
} else {
$mail->Port = $port;
}
// si se indica un tipo de seguridad este se utilizara,
// de lo contrario su usará el default.
if (empty($smtp_secure)) {
$mail->SMTPSecure = 'ssl';
} else {
$mail->SMTPSecure = $smtp_secure;
}
// si se indica un cambio en la autenticación este se utilizara,
// de lo contrario su usará el default.
if (empty($auth)) {
$mail->SMTPAuth = true;
} else {
$mail->SMTPAuth = $auth;
}
// si se indica un host este se utilizara,
// de lo contrario su usará el default.
if (empty($host)) {
$mail->Host = "securemail.aplus.net";
} else {
$mail->Host = $host;
}
// si se indica un usuario este se utilizara,
// de lo contrario su usará el default.
if (empty($username)) {
$mail->Username = "basededatos@globalcorporation.cc";
} else {
$mail->Username = $username;
}
// si se indica un password este se utilizara,
// de lo contrario su usará el default.
if (empty($password)) {
$mail->Password = "kIU8a#4i";
} else {
$mail->Password = $password;
}
$mail->Subject = $subject;
if ($def_from == 1) {
$mail->SetFrom($from[1], $from[0]);
} else {
$mail->SetFrom('basededatos@globalcorporation.cc', 'Global Corporation');
}
if ($rp == 1) {
$mail->AddReplyTo($replyto[1], $replyto[0]);
}
$mail->Body = " ";
$mail->MsgHTML($body);
if ($z == 2) {
for ($a = 0; $a < count($attachment_r); $a++) {
$mail->AddAttachment($attachment_r[$a], $attachment_t[$a]);
}
}
if ($y == 2) {
for ($a = 0; $a < count($embeddedimg_r); $a++) {
$mail->AddEmbeddedImage($embeddedimg_r[$a], $embeddedimg_t[$a]);
}
}
for ($i = 0; $i < count($to); $i++) {
$a = $to[$i];
$mail->AddAddress($a['direccion'], $a['nombre']);
}
for ($j = 0; $j < count($cc); $j++) {
$a = $cc[$j];
$mail->AddCC($a['direccion'], $a['nombre']);
}
for ($k = 0; $k < count($cco); $k++) {
$a = $cco[$k];
$mail->AddBCC($a['direccion'], $a['nombre']);
}
$mail->IsHTML(true);
if ($mail->Send()) {
return true;
} else {
$this->errors = "SEND_MAIL_ERROR " . $mail->ErrorInfo;
return 0;
}
}
示例8: phpmailer
function request_cancel($order_id)
{
$order_status = $this->status_model->get($order_id);
$problems = $_POST['problems'];
$mailer = new phpmailer();
$mailer->IsSendmail();
$mailer->From = 'noreply@domain.com';
$mailer->FromName = 'Belron admin';
$mailer->Subject = utf8_decode('Demande pour annuler pour une demande');
$email_message = "Une demande pour annuler une demande : <br/><br/>";
foreach ($problems as $problem) {
$email_message .= $problem . "<br/>";
}
$email_message .= "Pour confirmer l'annulation :<a href='" . base_url() . "orders/cancel/" . $order_id . "/" . $order_status[0]->code_verif . "/'>" . base_url() . "orders/cancel/" . $order_id . "/" . $order_status[0]->code_verif . "/ </a><br/>";
$mailer->MsgHTML($email_message);
$mailer->AddAddress('skander.jabouzi@groupimage.com', 'Skander Jabouzi');
$mailer->Send();
redirect('orders/request_confirmation');
}
示例9: phpmailer
function request_price()
{
$mailer = new phpmailer();
$mailer->IsSendmail();
$mailer->From = 'noreply@domain.com';
$mailer->FromName = 'Belron admin';
$mailer->Subject = utf8_decode('Demande pour pour revision de prix : #') . $_POST['id'];
$email_message = "Une demande pour revision de prix : #{$_POST['id']}<br/><br/>";
foreach ($problems as $problem) {
$email_message .= $_POST['price_request'] . "<br/>";
}
$email_message .= "La page du produit : <a href='" . base_url() . "productsmanager/edit/" . $_POST['id'] . "/'>" . base_url() . "productsmanager/edit/" . $_POST['id'] . "/ </a><br/>";
$mailer->MsgHTML($email_message);
$mailer->AddAddress('skander.jabouzi@groupimage.com', 'Skander Jabouzi');
$mailer->Send();
redirect('orders/request_confirmation');
}
示例10: autosend
* @param string mailto address
* @param string mail content
* @param array word replace rules
*
*/
public static function autosend($mailto, $content, $replace = null)
{
foreach ($replace as $k => $v) {
$content = str_replace($k, $v, $content);
}
$to = array();
if (is_string($mailto)) {
$to[0] = $mailto;
}
assert(trim($mailto) == '');
Mail::_send($to, $content);
}
/**
* Basic send function.
* @param array mailto list
* @param string content
* @param array attachment path list
*/
private static function _send($mailto, $content, $title = '', $attachment = null)
{
require_once 'phpmailer/class.phpmailer.php';
#echo "Begin!<br/>";
if ($title == '') {
$title = '来自IBM Power大赛官方的自动邮件,请勿直接回复本邮件。';
}
$mail = new phpmailer();
// defaults to using php "mail()"
$mail->IsSmtp();
// telling the class to use SendMail transport
#$body = 'hello cxj!<br/>';
#$body = eregi_replace("[\]",'',$body);
$config = C('PHPMAILER');
$address = $config['FROM'];
$password = $config['PASSWORD'];
$smtp = $config['HOST'];
$port = $config['PORT'];
#$mail->AddReplyTo($address,"First Last");
foreach ($mailto as $m) {
$mail->AddAddress($m, "Power大赛参赛选手 {$m} ");
}
$mail->SMTPAuth = true;
//$mail->from = $address;
//$mail->to = $address;
$mail->smtpsecure = 'ssl';
$mail->From = $address;