當前位置: 首頁>>代碼示例>>PHP>>正文


PHP phpmailer::SetLanguage方法代碼示例

本文整理匯總了PHP中phpmailer::SetLanguage方法的典型用法代碼示例。如果您正苦於以下問題:PHP phpmailer::SetLanguage方法的具體用法?PHP phpmailer::SetLanguage怎麽用?PHP phpmailer::SetLanguage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在phpmailer的用法示例。


在下文中一共展示了phpmailer::SetLanguage方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: phpmailer

<?php

$nome = $_REQUEST['nome'];
$setor = $_REQUEST['setorl'];
$email = $_REQUEST['email'];
$D1 = $_REQUEST['D1'];
$D2 = $_REQUEST['D2'];
$comentario = $_REQUEST['mensagem'];
require "class.phpmailer.php";
$mail = new phpmailer();
$mail->SetLanguage("br", "language/");
$mail->IsSMTP();
$mail->Host = "smtp.tecnodatacfc.com.br";
$mail->Port = 25;
$mail->Timeout = 30;
$mail->SMTPAuth = true;
$mail->Username = "chamado@tecnodatacfc.com.br";
$mail->Password = "1nf0es";
$mail->From = "chamado@tecnodatacfc.com.br";
$mail->FromName = "{$nome}";
$mail->AddAddress("sti@tecnodatacfc.com.br");
$mail->Sender = "chamado@tecnodatacfc.com.br";
$mail->Subject = "Chamado Suporte";
$mail->Body .= "Nome: " . $nome . "\r\n";
$mail->Body .= "Setor: " . $setor . "\r\n";
$mail->Body .= "E-mail: " . $email . "\r\n";
$mail->Body .= "1. -  Qual o motivo do chamado? " . $D1 . "\r\n";
$mail->Body .= "2. - Referente a qual assunto? " . $D2 . "\r\n";
$mail->Body .= "3. - Descreva o problema ou dúvida? " . $comentario . "\r\n";
$exit = $mail->Send();
if (!$exit) {
開發者ID:wborbajr,項目名稱:TecnodataApp,代碼行數:31,代碼來源:echamado.php

示例2: SetLanguage

 public function SetLanguage($lang_type = 'en', $lang_path = "language/")
 {
     $lang_path = Registry::get('config.dir.lib') . 'other/phpmailer/' . $lang_path;
     return parent::SetLanguage($lang_type, $lang_path);
 }
開發者ID:OneataBogdan,項目名稱:lead_coriolan,代碼行數:5,代碼來源:Mailer.php

示例3: enviaCorreo

function enviaCorreo($destinatario, $mensaje, $asunto)
{
    require_once "cod/lib/phpmailer/class.phpmailer.php";
    $mail = new phpmailer();
    $mail->PluginDir = "";
    $mail->SetLanguage("es");
    $mail->IsSMTP();
    $mail->Host = "localhost";
    $mail->SMTPAuth = true;
    $mail->Username = "web@extremadura.cnt.es";
    $mail->Password = "webextremadura";
    $mail->IsHTML(true);
    $mail->From = "web@extremadura.cnt.es";
    $mail->FromName = "CNT Extremadura - Contacto WEB";
    $mail->Timeout = 600;
    $mail->AddAddress("web@extremadura.cnt.es");
    if ($destinatario != '') {
        $mail->AddAddress($destinatario);
    }
    $mail->FromName = DENO_WEB;
    $mail->Subject = DENO_WEB . " - " . $asunto;
    $mail->Body = $mensaje;
    $mail->AltBody = $mensaje;
    if ($mail->Send()) {
        return true;
    } else {
        return $mail->ErrorInfo;
    }
}
開發者ID:espantaperros,項目名稱:cnt,代碼行數:29,代碼來源:envia.php

示例4: supportSendMail

function supportSendMail($email, $name, $subject, $message, $response_flag = false)
{
    global $sendmethod, $sockethost, $smtpauth, $smtpauthuser, $smtpauthpass, $socketfrom, $socketfromname, $socketreply, $socketreplyname;
    include_once 'class.phpmailer.php';
    $mail = new phpmailer();
    if (file_exists('class/language/phpmailer.lang-en.php')) {
        $mail->SetLanguage('en', 'class/language/');
    } else {
        $mail->SetLanguage('en', '../class/language/');
    }
    if (isset($sendmethod) && $sendmethod == 'sendmail') {
        $mail->IssupportSendMail();
    } elseif (isset($sendmethod) && $sendmethod == 'smtp') {
        $mail->IsSMTP();
    } elseif (isset($sendmethod) && $sendmethod == 'mail') {
        $mail->IsMail();
    } elseif (isset($sendmethod) && $sendmethod == 'qmail') {
        $mail->IsQmail();
    }
    $mail->Host = $sockethost;
    if ($smtpauth == 'TRUE') {
        $mail->SMTPAuth = true;
        $mail->Username = $smtpauthuser;
        $mail->Password = $smtpauthpass;
    }
    if (!$response_flag && isset($_GET['caseid']) && ($_GET['caseid'] == 'NewTicket' || $_GET['caseid'] == 'view')) {
        $mail->From = $email;
        $mail->FromName = $name;
        $mail->AddReplyTo($email, $name);
    } else {
        $mail->From = $socketfrom;
        $mail->FromName = $socketfromname;
        $mail->AddReplyTo($socketreply, $socketreplyname);
    }
    $mail->IsHTML(False);
    $mail->Body = $message;
    $mail->Subject = $subject;
    if (!$response_flag && isset($_GET['caseid']) && ($_GET['caseid'] == 'NewTicket' || $_GET['caseid'] == 'view')) {
        $mail->AddAddress($socketfrom, $socketfromname);
    } else {
        $mail->AddAddress($email, $name);
    }
    if (!$mail->Send()) {
        return 'Error: ' . $mail->ErrorInfo;
    } else {
        return 'Email Sent. ' . $mail->ErrorInfo;
    }
    $mail->ClearAddresses();
}
開發者ID:juliogallardo1326,項目名稱:proc,代碼行數:49,代碼來源:functions.php


注:本文中的phpmailer::SetLanguage方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。