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


PHP phpmailer::IsHTML方法代码示例

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


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

示例1: send

 /**
  * Send mail, similar to PHP's mail
  *
  * A true return value does not automatically mean that the user received the
  * email successfully. It just only means that the method used was able to
  * process the request without any errors.
  *
  * The default content type is 'text/plain' which does not allow using HTML.
  */
 public static function send($from_email, $from_name, array $to, $subject, $message, array $cc = array(), array $bcc = array(), array $attachments = array())
 {
     $mailer = new phpmailer();
     $content_type = 'text/plain';
     $mailer->ContentType = $content_type;
     $mailer->Hostname = \lib\conf\constants::$domain;
     $mailer->IsMail();
     $mailer->IsHTML(false);
     $mailer->From = $from_email;
     $mailer->FromName = $from_name;
     // add recipients
     foreach ((array) $to as $recipient_name => $recipient_email) {
         $mailer->AddAddress(trim($recipient_email), trim($recipient_name));
     }
     // Add any CC and BCC recipients
     foreach ($cc as $recipient_name => $recipient_email) {
         $mailer->AddCc(trim($recipient_email), trim($recipient_name));
     }
     foreach ($bcc as $recipient_name => $recipient_email) {
         $mailer->AddBcc(trim($recipient_email), trim($recipient_name));
     }
     // Set mail's subject and body
     $mailer->Subject = $subject;
     $mailer->Body = $message;
     foreach ($attachments as $attachment) {
         $mailer->AddAttachment($attachment);
     }
     // Send!
     $result = $mailer->Send();
     return $result;
 }
开发者ID:revcozmo,项目名称:dating,代码行数:40,代码来源:mail.php

示例2: activateUser

 /**
  * Activate a given user.
  * @param	$id				Identifier of user.
  * @param	$activationKey	Activation key for user.
  */
 function activateUser($id, $activationKey)
 {
     if (!empty($id) && !empty($activationKey)) {
         global $dbi;
         global $lActivate;
         $result = $dbi->query("SELECT username,activationKey FROM " . userTableName . " WHERE id=" . $dbi->quote($id));
         if ($result->rows()) {
             list($username, $activationKeyDB) = $result->fetchrow_array();
             if ($activationKey == $activationKeyDB) {
                 $dbi->query("UPDATE " . userTableName . " SET registered=registered,lastUpdated=lastUpdated,lastLogged=lastLogged,activated=1,activationKey='' WHERE id=" . $dbi->quote($id));
                 // Send confirmation email
                 $result = $dbi->query("SELECT name,email FROM " . userDataTableName . " WHERE id=" . $dbi->quote($id));
                 if ($result->rows()) {
                     list($name, $email) = $result->fetchrow_array();
                     // Send activation email
                     $mail = new phpmailer();
                     $mail->CharSet = "UTF-8";
                     $mail->Sender = pageAdminMail;
                     $mail->From = pageAdminMail;
                     $mail->FromName = pageTitle;
                     $mail->Subject = $lActivate["MailSubject"];
                     $mail->Body = sprintf($lActivate["MailMessage"], $name, $username);
                     $mail->IsHTML(false);
                     $mail->AddAddress($email);
                     $mail->Send();
                 }
                 echo '<p>' . $lActivate["HeaderText"] . '</p>';
             } else {
                 echo '<p>' . $lActivate["HeaderTextError"] . '</p>';
             }
         }
     }
 }
开发者ID:gkathir15,项目名称:catmis,代码行数:38,代码来源:Login.class.php

示例3: phpmailer

 function f_SEND($t_email = '', $t_asunto = '', $t_contenido)
 {
     require_once '../modelo/phpmailer/class.phpmailer.php';
     $a_email = new phpmailer();
     $a_email->Mailer = "smtp";
     $a_email->Host = "";
     $a_email->SMTPAuth = true;
     $a_email->Port = '465';
     $a_email->CharSet = 'utf8';
     $a_email->Username = '';
     $a_email->Password = '';
     $a_email->From = '';
     $a_email->FromName = '' . utf8_decode('');
     //escribir la el contenido del correo
     //dirección destino
     $a_correo = '' . $t_email;
     $a_email->addAddress($a_correo);
     $a_email->Subject = '' . utf8_decode('' . $t_asunto);
     $a_email->AddEmbeddedImage('../imagenes/inen_header.png', 'logoinen', 'inen_header.png');
     $a_email->IsHTML(true);
     $a_email->Body = "<p><img src=\"cid:logoinen\" /></p><p>" . utf8_decode('' . $t_contenido) . "</p>";
     $a_email->AltBody = ' ';
     if ($a_email->send()) {
         echo "</br>Mensaje enviado correctamente.</br>";
     } else {
         echo "<br/><strong>Información:</strong><br/>" . $a_email->ErrorInfo;
     }
 }
开发者ID:kruben84ec,项目名称:izel,代码行数:28,代码来源:cc_CORREO.php

示例4: email_to_user


//.........这里部分代码省略.........
                echo '<pre>' . "\n";
                $mail->SMTPDebug = true;
            }
            $mail->Host = $CFG->smtphosts;
            // specify main and backup servers
            if ($CFG->smtpuser) {
                // Use SMTP authentication
                $mail->SMTPAuth = true;
                $mail->Username = $CFG->smtpuser;
                $mail->Password = $CFG->smtppass;
            }
        }
    }
    /* not here yet, leave it in just in case.
       // make up an email address for handling bounces
       if (!empty($CFG->handlebounces)) {
           $modargs = 'B'.base64_encode(pack('V',$user->ident)).substr(md5($user->email),0,16);
           $mail->Sender = generate_email_processing_address(0,$modargs);
       }
       else {
           $mail->Sender   =  $CFG->sysadminemail;
       }
       */
    $mail->Sender = $CFG->sysadminemail;
    // for elgg. delete if we change the above.
    // TODO add a preference for maildisplay
    if (is_string($from)) {
        // So we can pass whatever we want if there is need
        $mail->From = $CFG->noreplyaddress;
        $mail->FromName = $from;
    } else {
        if (empty($from)) {
            // make stuff up
            $mail->From = $CFG->sysadminemail;
            $mail->FromName = $CFG->sitename . ' ' . __gettext('Administrator');
        } else {
            if ($usetrueaddress and !empty($from->maildisplay)) {
                $mail->From = $from->email;
                $mail->FromName = $from->name;
            } else {
                $mail->From = $CFG->noreplyaddress;
                $mail->FromName = $from->name;
                if (empty($replyto)) {
                    $mail->AddReplyTo($CFG->noreplyaddress, __gettext('Do not reply'));
                }
            }
        }
    }
    if (!empty($replyto)) {
        $mail->AddReplyTo($replyto, $replytoname);
    }
    $mail->Subject = $textlib->substr(stripslashes($subject), 0, 900);
    $mail->AddAddress($user->email, $user->name);
    $mail->WordWrap = 79;
    // set word wrap
    if (!empty($from->customheaders)) {
        // Add custom headers
        if (is_array($from->customheaders)) {
            foreach ($from->customheaders as $customheader) {
                $mail->AddCustomHeader($customheader);
            }
        } else {
            $mail->AddCustomHeader($from->customheaders);
        }
    }
    if (!empty($from->priority)) {
        $mail->Priority = $from->priority;
    }
    //TODO add a user preference for this. right now just send plaintext
    $user->mailformat = 0;
    if ($messagehtml && $user->mailformat == 1) {
        // Don't ever send HTML to users who don't want it
        $mail->IsHTML(true);
        $mail->Encoding = 'quoted-printable';
        // Encoding to use
        $mail->Body = $messagehtml;
        $mail->AltBody = "\n{$messagetext}\n";
    } else {
        $mail->IsHTML(false);
        $mail->Body = "\n{$messagetext}\n";
    }
    if ($attachment && $attachname) {
        if (ereg("\\.\\.", $attachment)) {
            // Security check for ".." in dir path
            $mail->AddAddress($CFG->sysadminemail, $CFG->sitename . ' ' . __gettext('Administrator'));
            $mail->AddStringAttachment('Error in attachment.  User attempted to attach a filename with a unsafe name.', 'error.txt', '8bit', 'text/plain');
        } else {
            require_once $CFG->libdir . '/filelib.php';
            $mimetype = mimeinfo('type', $attachname);
            $mail->AddAttachment($attachment, $attachname, 'base64', $mimetype);
        }
    }
    if ($mail->Send()) {
        //        set_send_count($user); // later
        return true;
    } else {
        mtrace('ERROR: ' . $mail->ErrorInfo);
        return false;
    }
}
开发者ID:BackupTheBerlios,项目名称:tulipan-svn,代码行数:101,代码来源:elgglib.php

示例5: sendmail

function sendmail($subject, $mailcontent, $receiver, $receivername, $attachment = "")
{
    if (strpos($_SERVER['HTTP_HOST'], "localhost")) {
        return false;
    }
    $mail = new phpmailer();
    $mail->IsSMTP();
    $mail->Host = "mail.pepool.com";
    $mail->Port = 2525;
    $mail->SMTPAuth = true;
    $mail->Username = "info+pepool.com";
    // Write SMTP username in ""
    $mail->Password = "*VTWqNzPNKlut";
    $mail->Mailer = "smtp";
    $mail->IsHTML(true);
    $mail->ClearAddresses();
    $mail->From = "info@pepool.com";
    $mail->FromName = "pepool";
    $mail->Subject = $subject;
    $mail->Body = $mailcontent;
    $mail->AddAddress($receiver, $receivername);
    if ($attachment != '') {
        $mail->AddAttachment($attachment);
    }
    $suc = $mail->Send();
    return $suc > 0;
}
开发者ID:gauravstomar,项目名称:Pepool,代码行数:27,代码来源:Mail.php

示例6: proc_upd

 public function proc_upd()
 {
     $obj = ormPages::get(system::POST('obj_id'));
     $obj->tabuList('pseudo_url', 'h1', 'keywords', 'title', 'description', 'active', 'is_home_page', 'view_in_menu', 'view_submenu', 'in_search', 'in_index', 'in_new_window', 'other_link', 'img_act', 'img_no_act', 'img_h1');
     $obj->loadFromPost();
     // Публикация на сайте
     if (system::POST('publ', isBool)) {
         if ($obj->isInheritor('faq') && $obj->newVal('answer') == '') {
             ui::MessageBox(lang::get('TEXT_MESSAGE_ERROR'), lang::get('FEEDBACK_MSG_3'));
             ui::selectErrorFields(array('select' => '', 'focus' => 'answer'));
         } else {
             $obj->active = 1;
         }
     }
     $obj_id = $obj->save();
     // Если объект не сохранился, выводим пользователю текст ошибки.
     if ($obj_id === false) {
         system::savePostToSession();
         ui::MessageBox(lang::get('TEXT_MESSAGE_ERROR'), $obj->getErrorListText());
         ui::selectErrorFields($obj->getErrorFields());
         system::redirect('/feedback/message_upd/' . $_POST['obj_id']);
     }
     if (system::POST('send_to_email', isBool) && !$obj->send_answer_to_user && ($form_obj = ormObjects::get($obj->form_id))) {
         if ($form_obj->send_answer) {
             if ($obj->answer != '') {
                 $fields = $obj->getClass()->loadFields();
                 while (list($num, $field) = each($fields)) {
                     if (!empty($field['f_sname'])) {
                         page::assign($field['f_sname'], $obj->__get($field['f_sname']));
                     }
                 }
                 page::assign('site_name', domains::curDomain()->getSiteName());
                 page::assign('base_email', domains::curDomain()->getEmail());
                 $mail = new phpmailer();
                 $mail->From = $this->parse($form_obj->answer_sender_address);
                 $mail->FromName = $this->parse($form_obj->answer_sender_name);
                 $mail->AddAddress($obj->email);
                 $mail->WordWrap = 50;
                 $mail->IsHTML(true);
                 $mail->Subject = $this->parse($form_obj->answer_subject);
                 $mail->Body = $this->parse($form_obj->answer_template);
                 $mail->Send();
                 // Помечаем, что ответ отправлен
                 $obj->send_answer_to_user = 1;
                 $obj->save();
                 ui::MessageBox(lang::get('FEEDBACK_MSG_1'), '');
             } else {
                 ui::MessageBox(lang::get('TEXT_MESSAGE_ERROR'), lang::get('FEEDBACK_MSG_2'));
                 ui::selectErrorFields(array('select' => '', 'focus' => 'answer'));
             }
         }
     }
     // Если данные изменились корректно перенаправляем на соответствующию страницу
     if ($_POST['parram'] == 'apply') {
         system::redirect('/feedback/message_upd/' . $obj_id);
     } else {
         system::redirect('/feedback');
     }
 }
开发者ID:sunfun,项目名称:Bagira.CMS,代码行数:59,代码来源:__message.php

示例7: fu_envia_clave

function fu_envia_clave($nom, $email, $email_ins, $user, $clave, $tipo)
{
    require_once "class.phpmailer.php";
    $mail = new phpmailer();
    $mail->From = "computo@udistrital.edu.co";
    $mail->FromName = "Oficina Asesora de Sistemas";
    $mail->Host = "mail.udistrital.edu.co";
    $mail->Mailer = "smtp";
    $mail->SMTPAuth = true;
    $mail->Username = "computo@udistrital.edu.co";
    $mail->Password = "capitaloas2011";
    $mail->Timeout = 120;
    $mail->Charset = "utf-8";
    $mail->IsHTML(false);
    if ($tipo == 4) {
        $tip = "Coordinador";
    } elseif ($tipo == 16) {
        $tip = "Decano";
    } elseif ($tipo == 24) {
        $tip = "Funcionario";
    } elseif ($tipo == 26) {
        $tip = "Proveedor";
    } elseif ($tipo == 30) {
        $tip = "Docente";
    } elseif ($tipo == 51) {
        $tip = "Estudiante";
    }
    //echo "tipo en fua_ ".$tipo; exit;
    $fecha = date("d-M-Y  h:i:s A");
    $comen = "Mensaje generado autom&aacute;ticamente por el servidor de la Oficina Asesora de Sistemas.\n";
    $comen .= "Este es su usuario y clave para ingresar al Sistema de Informaci&oacute;n C&oacute;ndor.\n\n";
    $comen .= "Por seguridad cambie la clave.\n\n";
    $sujeto = "Clave";
    $cuerpo = "Fecha de envio: " . $fecha . "\n\n";
    $cuerpo .= "Se&ntilde;or(a)      : " . $nom . "\n\n";
    $cuerpo .= $comen . "\n\n";
    $cuerpo .= "Tipo:           " . $tip . "\n";
    $cuerpo .= "Usuario:        " . $user . "\n";
    $cuerpo .= "Clave Acceso:   " . $clave . "\n";
    $mail->Body = $cuerpo;
    $mail->Subject = $sujeto;
    $mail->AddAddress($email);
    $mail->AddCC($email_ins);
    if (!$mail->Send()) {
        header("Location: {$redir}?error_login=16");
    } else {
        header("Location: {$redir}?error_login=18");
    }
    $mail->ClearAllRecipients();
}
开发者ID:udistrital,项目名称:PROVEEDORES_DES,代码行数:50,代码来源:fu_envia_clave_aut.php

示例8: sendmail

 public function sendmail($from, $to, $subject, $body, $altbody = null, $options = null, $attachments = null, $html = false)
 {
     if (!is_array($from)) {
         $from = array($from, $from);
     }
     $mail = new phpmailer();
     $mail->PluginDir = 'M/lib/phpmailer/';
     if ($this->getConfig('smtp')) {
         $mail->isSMTP();
         $mail->Host = $this->getConfig('smtphost');
         if ($this->getConfig('smtpusername')) {
             $mail->SMTPAuth = true;
             $mail->Port = $this->getConfig('smtpport') ? $this->getConfig('smtpport') : 25;
             $mail->SMTPDebug = $this->smtpdebug;
             $mail->Username = $this->getConfig('smtpusername');
             $mail->Password = $this->getConfig('smtppassword');
         }
     }
     $mail->CharSet = $this->getConfig('encoding');
     $mail->AddAddress($to);
     $mail->Subject = $subject;
     $mail->Body = $note . $body;
     $mail->AltBody = $altbody;
     if (!is_array($from)) {
         $from = array($from, $from);
     }
     $mail->From = $from[0];
     $mail->FromName = $from[1];
     if (key_exists('reply-to', $options)) {
         $mail->AddReplyTo($options['reply-to']);
         unset($options['reply-to']);
     }
     if (key_exists('Sender', $options)) {
         $mail->Sender = $options['Sender'];
     }
     if (null != $attachments) {
         if (!is_array($attachments)) {
             $attachments = array($attachments);
         }
         foreach ($attachments as $k => $v) {
             if (!$mail->AddAttachment($v, basename($v))) {
                 trigger_error("Attachment {$v} could not be added");
             }
         }
     }
     $mail->IsHTML($html);
     $result = $mail->send();
 }
开发者ID:demental,项目名称:m,代码行数:48,代码来源:Phpmailer.php

示例9: sendList

 function sendList($list)
 {
     // send email of message
     global $loader, $intl, $conf;
     $loader->import('saf.Ext.phpmailer');
     $mail = new phpmailer();
     $mail->IsMail();
     $mail->IsHTML(true);
     foreach ($list as $item) {
         if (strtoupper($item->type) == 'TASK') {
             $id = 'T' . $item->id;
         } elseif (strtoupper($item->type) == 'MESSAGE') {
             $id = 'M' . $item->id;
         } else {
             $id = strtoupper(substr($item->type, 0, 1)) . $item->id;
         }
         $mail->From = $conf['Messaging']['return_address'];
         //$mail->Subject = '[' . $this->id . '] ' . $this->subject;
         //$mail->Body = $this->body;
         $mail->AddAddress($item->address);
         if (defined('WORKSPACE_' . strtoupper($item->type) . '_' . strtoupper($this->name) . '_SUBJECT')) {
             $mail->Subject = $intl->get(constant('WORKSPACE_' . strtoupper($item->type) . '_' . strtoupper($this->name) . '_SUBJECT'), $item->struct);
         } else {
             $mail->Subject = '[' . $id . '] ' . $item->subject;
         }
         if (defined('WORKSPACE_' . strtoupper($item->type) . '_' . strtoupper($this->name) . '_BODY')) {
             $mail->Body = $intl->get(constant('WORKSPACE_' . strtoupper($item->type) . '_' . strtoupper($this->name) . '_BODY'), $item->struct);
         } else {
             $mail->Body = $item->body;
         }
         if ($item->priority == 'urgent' || $item->priority == 'high') {
             $mail->Priority = 1;
         } else {
             $mail->Priority = 3;
         }
         if (!$mail->Send()) {
             $this->error = $mail->ErrorInfo;
             return false;
         }
         $mail->ClearAddresses();
         $mail->ClearAttachments();
     }
     return true;
 }
开发者ID:vojtajina,项目名称:sitellite,代码行数:44,代码来源:Email.php

示例10: enviar

 function enviar($arguntos)
 {
     # code...
     $mail = new phpmailer(true);
     // the true param means it will throw exceptions on errors, which we need to catch
     $mail->IsSMTP();
     // telling the class to use SMTP
     $mail->Host = Host;
     // SMTP server
     $mail->SMTPDebug = 0;
     // enables SMTP debug information (for testing)
     $mail->IsHTML(true);
     $mail->SMTPAuth = SMTPAuth;
     // enable SMTP authentication
     $mail->SMTPSecure = SMTPSecure;
     // sets the prefix to the servier
     $mail->Port = Port;
     // set the SMTP port for the GMAIL server
     $mail->Username = Username;
     // GMAIL username
     $mail->Password = Password;
     // GMAIL password
     $mail->AddAddress($arguntos['email'], $arguntos['nomebusca']);
     if (AddReplyTo != '') {
         $mail->AddReplyTo(AddReplyTo);
     }
     $mail->Subject = $arguntos['Subject'];
     $mail->From = SetFromEmail;
     $mail->FromName = SetFromNome;
     $mail->Body = $arguntos['conteudo'];
     // optional - MsgHTML will create an alternate automatically
     // $mail->MsgHTML($arguntos['conteudo']);
     if ($mail->Send()) {
         echo "<p>Mensagem enviada com Sucesso!!!!</p>\n";
     }
 }
开发者ID:tvieira,项目名称:homebank,代码行数:36,代码来源:old_enviaemail.php

示例11: SendMail

function SendMail($email, $name, $subject, $message)
{
    global $sockethost, $smtpauth, $smtpauthuser, $smtpauthpass, $socketfrom, $socketfromname, $socketreply, $socketreplyname;
    include 'class.phpmailer.php';
    $mail = new phpmailer();
    $mail->IsSMTP();
    $mail->Host = $sockethost;
    if ($smtpauth == 'TRUE') {
        $mail->SMTPAuth = true;
        $mail->Username = $smtpauthuser;
        $mail->Password = $smtpauthpass;
    }
    if (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 (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->ClearAddresses();
}
开发者ID:paintballrefjosh,项目名称:php-nuke-support-ticket,代码行数:36,代码来源:functions.php

示例12: phpmailer

<?php

include_once($this->miConfigurador->getVariableConfiguracion("raizDocumento") . "/classes/mail/class.phpmailer.php");
include_once($this->miConfigurador->getVariableConfiguracion("raizDocumento") . "/classes/mail/class.smtp.php");

$mail = new phpmailer();
$mail->From = "condor@udistrital.edu.co";
$mail->FromName = "Sistema de egresados Universidad Distrital Francisco Jose de Caldas";
$mail->Host = "mail.udistrital.edu.co";
$mail->Mailer = "smtp";
$mail->SMTPAuth = true;
$mail->Username = "condor@udistrital.edu.co";
$mail->Password = "CondorOAS2012";
$mail->Timeout = 120;
$mail->Charset = "utf-8";
$mail->IsHTML(false);


$fecha = date("d-M-Y  h:i:s A");
$comen = "Mensaje generado automaticamente por el servidor de la Oficina Asesora de Sistemas. \n";
$comen.= "Asignación o Cambio de segunda clave.\n\n";
$comen .= "Universidad Distrital Francisco José de Caldas PBX: (057) (1) 3239300 - 3238400 Sede principal: Carrera 7 No. 40B - 53 Oficina Asesora de Sistema Ext. 1112 \n";


$sujeto = "Datos de Acceso";
$cuerpo = "Fecha de envio: " . $fecha . "\n\n";

$cuerpo.="Estimado ".$nombre.":\n\n";
$cuerpo.="Usted ha solicitado generar o actualizar la segunda clave, el proceso se ha realizado exitosamente. \n\n";
$cuerpo.="Si usted no ha solicitado esta actualización, y ha recibido este correo, por favor comuniquese inmediatamente \n";
$cuerpo.="con la oficina asesora de sistema ya que puede ser victima de plagio.\n\n";
开发者ID:udistrital,项目名称:perseo_desarrollo,代码行数:31,代码来源:enviarCorreoClave.php

示例13: addslashes

 $email = addslashes($_POST['email']);
 $q = "SELECT reg_id, email FROM user_info WHERE email='" . $email . "' ";
 $r = mysql_query($q) or die(mysql_error());
 $d = mysql_fetch_array($r);
 if (!mysql_num_rows($r)) {
     header("location:rlogin_a.php");
 } else {
     $reg_id = $d['reg_id'];
     $verify_id = md5(SHA1($email));
     include "phpmailer/class.phpmailer.php";
     include "phpmailer/class.smtp.php";
     $nits_rec2 = new phpmailer();
     $nits_rec2->IsSMTP();
     $nits_rec2->SMTPAuth = "true";
     $nits_rec2->SMTPDebug = 2;
     $nits_rec2->IsHTML(true);
     $nits_rec2->SMTPAuth = true;
     $nits_rec2->Username = "recruitment@nits.ac.in";
     //to change email id from sending
     $nits_rec2->Password = "nits_rec@123";
     //its password
     $nits_rec2->SMTPSecure = 'tls';
     $nits_rec2->From = "recruitment@nits.ac.in";
     $nits_rec2->FromName = "NIT Silchar";
     $nits_rec2->Subject = "Forget Password | Recruitment Registration, NIT Silchar!";
     $nits_rec2->Host = "172.16.30.72";
     // HOST SMTP OUT ADDRESS
     $nits_rec2->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/'>National Institute of Technology Silchar</a></h1></div></div>";
     $body .= "<br /><br/><br/><b>To reset your password <a href='http://recruitment.nits.ac.in/non_faculty/forget_pwd.php?vid=" . $verify_id . "&rid=" . $reg_id . "'>CLICK HERE</a></b></div></body>";
     $nits_rec2->Mailer = "smtp";
开发者ID:Wicklers,项目名称:NITS-Online-Recruitment-Portal,代码行数:31,代码来源:forget_pwd.php

示例14: phpmailer

 $enlace .= "&nombre=" . $egresados[$i]['nombre'];
 $enlace .= "&correo=" . $egresados[$i]['correo'];
 $enlace .= "&identificacion=" . $egresados[$i]['identificacion'];
 $enlace .= "&tiempo=" . $tiempo;
 $enlace = $this->miConfigurador->fabricaConexiones->crypto->codificar_url($enlace, $directorio);
 $mail = new phpmailer();
 $mail->From = "sistemaegresados@udistrital.edu.co";
 $mail->FromName = "Sistema de egresados Universidad Distrital Francisco Jose de Caldas";
 $mail->Host = "mail.udistrital.edu.co";
 $mail->Mailer = "smtp";
 $mail->SMTPAuth = true;
 $mail->Username = "condor@udistrital.edu.co";
 $mail->Password = "CondorOAS2012";
 $mail->Timeout = 120;
 $mail->Charset = "utf-8";
 $mail->IsHTML(TRUE);
 $asunto = "Datos de acceso";
 $html = "<div align='center'><img src='" . $rutaBloque . "/css/images/ud.jpg'></div>";
 $html .= "Respetado Destinatario(a) <br><br>";
 $html .= "Reciba un cordial saludo, <br><br>";
 $html .= "Nos permitimos informarle que su correo electrónico aparece asociado a la información de " . $egresados[$i]['nombre'] . ", en la base de datos del Sistema de Egresados de la Universidad Distrital Francisco José de Caldas.<br><br>";
 $html .= "Si usted, como propietario de la cuenta de correo, identifica que la información relacionada es errónea, por favor omita el resto del contenido del mensaje.<br><br>";
 $html .= "Si por el contrario, la información relacionada coincide con sus nombres y apellidos, lo invitamos a leer la siguiente información de su interés:<br><br> ";
 $html .= "<strong><b>Portal de Egresados Universidad Distrital Francisco José de Caldas</b></strong><br><hr><br>";
 $html .= "<blink><b>AVISO LEGAL</b>:</blink> La Universidad Distrital Francisco José de Caldas, informa que a través del presente mensaje solo autoriza el ingreso al Portal de Egresados a " . $egresados[$i]['nombre'] . ". El no acatamiento de esta autorización puede acarrear la consecuencias legales que se mencionan en la Ley 1273 del 5 de Enero de 2009 y las demás que apliquen. <br><br>";
 $html .= "Respetado egresado:<br><br>";
 $html .= "A través del siguiente enlace podrá registrar las credenciales de acceso al Portal de Egresados de la Universidad Distrital Francisco José de Caldas.<br><br><a href='" . $enlace . "'>Acceso al portal de egresados</a><br><br>";
 $html .= "La primera vez que acceda al Portal, se le solicitará la autorización para el tratamiento de datos, conforme a los estipulado en la Ley 1581 de 2012 y el decreto reglamentario 1377 de 2013. Además, para favorecer la aplicación de medidas de protección de la identidad, deberá registrar datos de contacto que permitan su posterior verificación.<br><br>";
 $html .= "En caso de alguna observación por favor dirigir un correo a <a href='computo@udistrital.edu.co'>computo@udistrital.edu.co</a> .<br><br>";
 $html .= "Este mensaje se ha generado automaticamente por el servidor de Asignación de clave de acceso al Sistema de Egresados. Se solicita no responder al remitente.<br><br>";
 $html .= "<br><hr><br>";
开发者ID:udistrital,项目名称:ADMISIONES_PRODUCCION,代码行数:31,代码来源:enviarCorreo.php

示例15: sendMail

 /**
  * Send a confirmation e-mail to the address specified in the form,
  * if any.
  * @param $id
  * @param unknown_type $email
  * @return unknown
  */
 function sendMail($feedId, $email)
 {
     global $_CONFIG, $objDatabase, $_ARRAYLANG, $objInit;
     $feedId = intval($feedId);
     $languageId = null;
     // Get the user ID and entry information
     $objResult = $objDatabase->Execute("\n            SELECT addedby, title, language\n              FROM " . DBPREFIX . "module_directory_dir\n             WHERE id='{$feedId}'");
     if ($objResult && !$objResult->EOF) {
         $userId = $objResult->fields['addedby'];
         $feedTitle = $objResult->fields['title'];
         $languageId = $objResult->fields['language'];
     }
     // Get user data
     if (is_numeric($userId)) {
         $objFWUser = new \FWUser();
         if ($objFWUser->objUser->getUser($userId)) {
             $userMail = $objFWUser->objUser->getEmail();
             $userFirstname = $objFWUser->objUser->getProfileAttribute('firstname');
             $userLastname = $objFWUser->objUser->getProfileAttribute('lastname');
             $userUsername = $objFWUser->objUser->getUsername();
         }
     }
     if (!empty($email)) {
         $sendTo = $email;
         $mailId = 2;
     } else {
         // FIXED:  The mail addresses may *both* be empty!
         // Adding the entry was sucessful, however.  So we can probably assume
         // that it was a success anyway?
         // Added:
         if (empty($userMail)) {
             return true;
         }
         // ...and a boolean return value below.
         $sendTo = $userMail;
         $mailId = 1;
     }
     //get mail content n title
     $objResult = $objDatabase->Execute("\n            SELECT title, content\n              FROM " . DBPREFIX . "module_directory_mail\n             WHERE id='{$mailId}'");
     if ($objResult && !$objResult->EOF) {
         $subject = $objResult->fields['title'];
         $message = $objResult->fields['content'];
     }
     if ($objInit->mode == 'frontend') {
         $link = "http://" . $_CONFIG['domainUrl'] . CONTREXX_SCRIPT_PATH . "?section=Directory&cmd=detail&id=" . $feedId;
     } else {
         $link = "http://" . $_CONFIG['domainUrl'] . ASCMS_PATH_OFFSET . '/' . \FWLanguage::getLanguageParameter($languageId, 'lang') . '/' . CONTREXX_DIRECTORY_INDEX . "?section=Directory&cmd=detail&id=" . $feedId;
     }
     // replace placeholders
     $array_1 = array('[[USERNAME]]', '[[FIRSTNAME]]', '[[LASTNAME]]', '[[TITLE]]', '[[LINK]]', '[[URL]]', '[[DATE]]');
     $array_2 = array($userUsername, $userFirstname, $userLastname, $feedTitle, $link, $_CONFIG['domainUrl'] . ASCMS_PATH_OFFSET, date(ASCMS_DATE_FORMAT));
     $subject = str_replace($array_1, $array_2, $subject);
     $message = str_replace($array_1, $array_2, $message);
     $sendTo = explode(';', $sendTo);
     if (@\Env::get('ClassLoader')->loadFile(ASCMS_LIBRARY_PATH . '/phpmailer/class.phpmailer.php')) {
         $objMail = new \phpmailer();
         if ($_CONFIG['coreSmtpServer'] > 0 && @\Env::get('ClassLoader')->loadFile(ASCMS_CORE_PATH . '/SmtpSettings.class.php')) {
             $arrSmtp = SmtpSettings::getSmtpAccount($_CONFIG['coreSmtpServer']);
             if ($arrSmtp !== false) {
                 $objMail->IsSMTP();
                 $objMail->Host = $arrSmtp['hostname'];
                 $objMail->Port = $arrSmtp['port'];
                 $objMail->SMTPAuth = true;
                 $objMail->Username = $arrSmtp['username'];
                 $objMail->Password = $arrSmtp['password'];
             }
         }
         $objMail->CharSet = CONTREXX_CHARSET;
         $objMail->From = $_CONFIG['coreAdminEmail'];
         $objMail->FromName = $_CONFIG['coreAdminName'];
         $objMail->AddReplyTo($_CONFIG['coreAdminEmail']);
         $objMail->Subject = $subject;
         $objMail->IsHTML(false);
         $objMail->Body = $message;
         foreach ($sendTo as $mailAdress) {
             $objMail->ClearAddresses();
             $objMail->AddAddress($mailAdress);
             $objMail->Send();
         }
     }
     return true;
 }
开发者ID:nahakiole,项目名称:cloudrexx,代码行数:89,代码来源:DirectoryLibrary.class.php


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