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


PHP htmlMimeMail::setCc方法代码示例

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


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

示例1: EmailSuppliers

 function EmailSuppliers()
 {
     $EmailText = _('This email has been automatically generated by KwaMoja') . "\n";
     $EmailText .= _('You are invited to Tender for the following products to be delivered to') . ' ' . $_SESSION['CompanyRecord']['coyname'] . "\n";
     $EmailText .= _('Tender number') . ': ' . $this->TenderId . "\n";
     $EmailText .= _(' Quantity ') . ' ' . _(' Unit ') . ' ' . _(' Item Description') . "\n";
     foreach ($this->LineItems as $LineItem) {
         $EmailText .= $LineItem->Quantity . ' ' . $LineItem->Units . ' ' . $LineItem->ItemDescription . "\n";
     }
     $Subject = _('Tender received from') . ' ' . $_SESSION['CompanyRecord']['coyname'];
     $Headers = 'From: ' . $_SESSION['PurchasingManagerEmail'] . "\r\n" . 'Reply-To: ' . $_SESSION['PurchasingManagerEmail'] . "\r\n" . 'X-Mailer: PHP/' . phpversion();
     if ($_SESSION['SmtpSetting'] == 1) {
         include 'includes/htmlMimeMail.php';
         $mail = new htmlMimeMail();
         $mail->setText($EmailText);
         $mail->setSubject($Subject);
         $mail->setFrom($_SESSION['PurchasingManagerEmail']);
         $mail->setHeader('Reply-To', $_SESSION['PurchasingManagerEmail']);
         $mail->setCc($_SESSION['PurchasingManagerEmail']);
         //Set this as a copy for filing purpose
     }
     foreach ($this->Suppliers as $Supplier) {
         $result = mail($Supplier->EmailAddress, $Subject, $EmailText, $Headers);
         if ($_SESSION['SmtpSetting'] == 0) {
             $result = mail($Supplier->EmailAddress, $Subject, $EmailText, $Headers);
         } else {
             $result = SendmailBySmtp($mail, array($Supplier->EmailAddress, $_SESSION['PurchasingManagerEmail']));
         }
     }
 }
开发者ID:rrsc,项目名称:KwaMoja,代码行数:30,代码来源:DefineTenderClass.php

示例2: EmailOffer

 function EmailOffer()
 {
     $Subject = _('Offer received from') . ' ' . $this->GetSupplierName();
     $Message = _('This email is automatically generated by webERP') . "\n" . _('You have received the following offer from') . ' ' . $this->GetSupplierName() . "\n\n" . $this->OfferMailText;
     $Headers = 'From: ' . $this->GetSupplierEmail() . "\r\n" . 'Reply-To: ' . $this->GetSupplierEmail() . "\r\n" . 'X-Mailer: PHP/' . phpversion();
     if ($_SESSION['SmtpSetting'] == 1) {
         include 'includes/htmlMimeMail.php';
         $mail = new htmlMimeMail();
         $mail->setText($Message);
         $mail->setSubject($Subject);
         $mail->setFrom($this->GetSupplierEmail());
         $mail->setHeader('Reply-To', $this->GetSupplierEmail());
         $mail->setCc($this->GetSupplierEmail());
     }
     if ($_SESSION['SmtpSetting'] == 0) {
         $result = mail($_SESSION['PurchasingManagerEmail'], $Subject, $Message, $Headers);
     } else {
         $result = SendmailBySmtp($mail, array($Supplier->EmailAddress, $_SESSION['PurchasingManagerEmail']));
     }
     return $result;
 }
开发者ID:strollClouds,项目名称:snkStudy,代码行数:21,代码来源:DefineOfferClass.php

示例3: header

 $current = $webmaillib->get_current_webmail_account($user);
 if (!$current) {
     header("location: tiki-webmail.php?locSection=settings");
     die;
 }
 // Send a message
 if (isset($_REQUEST["reply"]) || isset($_REQUEST["replyall"])) {
     check_ticket('webmail');
     $webmaillib->set_mail_flag($current["accountId"], $user, $_REQUEST["realmsgid"], 'isReplied', 'y');
 }
 $smarty->assign('sent', 'n');
 $smarty->assign('attaching', 'n');
 if (isset($_REQUEST["send"])) {
     $mail = new htmlMimeMail();
     $mail->setFrom($current["account"]);
     $mail->setCc($_REQUEST["cc"]);
     $mail->setBcc($_REQUEST["bcc"]);
     $mail->setSubject($_REQUEST["subject"]);
     if ($_REQUEST["attach1"]) {
         check_ticket('webmail');
         $a1 = $mail->getFile('temp/mail_attachs/' . $_REQUEST["attach1file"]);
         $mail->addAttachment($a1, $_REQUEST["attach1"], $_REQUEST["attach1type"]);
         @unlink('temp/mail_attachs/' . $_REQUEST["attach1file"]);
     }
     if ($_REQUEST["attach2"]) {
         check_ticket('webmail');
         $a2 = $mail->getFile('temp/mail_attachs/' . $_REQUEST["attach2file"]);
         $mail->addAttachment($a2, $_REQUEST["attach2"], $_REQUEST["attach2type"]);
         @unlink('temp/mail_attachs/' . $_REQUEST["attach2file"]);
     }
     if ($_REQUEST["attach3"]) {
开发者ID:noikiy,项目名称:owaspbwa,代码行数:31,代码来源:tiki-webmail.php

示例4: sendEmail

 static function sendEmail($to, $subject, $html, $text = "", $from = false, $return = false, $cc = false, $bcc = false, $headers = array())
 {
     $mailer = new htmlMimeMail();
     $headers["X-Mailer"] = "BigTree CMS (http://www.bigtreecms.org) + HTML Mime mail class (http://www.phpguru.org)";
     foreach ($headers as $key => $val) {
         $mailer->setHeader($key, $val);
     }
     $mailer->setSubject($subject);
     $mailer->setHtml($html, $text);
     if (!$from) {
         $from = "no-reply@" . (isset($_SERVER["HTTP_HOST"]) ? str_replace("www.", "", $_SERVER["HTTP_HOST"]) : str_replace(array("http://www.", "https://www.", "http://", "https://"), "", DOMAIN));
     }
     $mailer->setFrom($from);
     if ($return) {
         $mailer->setReturnPath($return);
     }
     if ($cc) {
         $mailer->setCc(is_array($cc) ? $cc : array($cc));
     }
     if ($bcc) {
         $mailer->setBcc(is_array($bcc) ? $bcc : array($bcc));
     }
     return $mailer->send(is_array($to) ? $to : array($to));
 }
开发者ID:matthisamoto,项目名称:Graphfan,代码行数:24,代码来源:utils.php

示例5: htmlMimeMail

error_reporting(E_ALL);
include 'htmlMimeMail.php';
/**
* Example of usage. This example shows
* how to use the class to send Bcc: 
* and/or Cc: recipients.
*
* Create the mail object.
*/
$mail = new htmlMimeMail();
/**
* We will just send a text email
*/
$text = $mail->getFile('example.txt');
$mail->setText($text);
/**
* Send the email using smtp method. The setSMTPParams()
* method simply changes the HELO string to example.com
* as localhost and port 25 are the defaults.
*/
$mail->setSMTPParams('localhost', 25, 'example.com');
$mail->setReturnPath('joe@example.com');
$mail->setBcc('bcc@example.com');
$mail->setCc('Carbon Copy <cc@example.com>');
$result = $mail->send(array('postmaster@localhost'), 'smtp');
// These errors are only set if you're using SMTP to send the message
if (!$result) {
    print_r($mail->errors);
} else {
    echo 'Mail sent!';
}
开发者ID:4v4t4r,项目名称:CTF-LCC,代码行数:31,代码来源:example.4.php

示例6: send_mail_new

function send_mail_new($to_name, $to_email, $from_name = "", $from_email = "", $subject = "", $message, $mail_type = "", $att_ids = "", $bcc_email = "", $cc_email = "", $reply = "", $f_type = "")
{
    //require_once 'swift/lib/swift_required.php';
    global $Site_Name;
    global $AdminName;
    global $AdminMail;
    global $AdminToName;
    global $AdminToEmail;
    global $USESENDGRID;
    if ($from_name == "") {
        $from_name = $AdminName;
    }
    if ($from_email == "") {
        $from_email = $AdminMail;
    }
    if ($to_name == "") {
        $to_name = $AdminToName;
    }
    if ($to_email == "") {
        $to_email = $AdminToEmail;
    }
    $message = str_replace("\\n", "\\r\\n", $message);
    $from = "{$from_name} <{$from_email}>";
    $to = "{$to_name} <{$to_email}>";
    if ($USESENDGRID == 0) {
        $headers = "MIME-Version: 1.0\n";
        $headers .= "Content-type: text/html; charset=iso-8859-1\n";
        $headers .= "From: {$from}\n";
        if ($reply) {
            $headers .= "Reply-To: {$reply} \n";
        }
        if ($cc_email) {
            $headers .= "CC: {$cc_email} \n";
        }
        $headers .= "BCC: " . $bcc_email;
        if ($att_ids != "" && $f_type != '') {
            $mail = new htmlMimeMail();
            $mail->setSubject($subject);
            //$mail->setText($message);
            $mail->setHtml($message);
            $mail->setFrom($from);
            if ($cc_email) {
                $mail->setCc($cc_email);
            }
            if ($bcc_email) {
                $mail->setBcc($bcc_email);
            }
            if ($reply) {
                $mail->setHeader("Return-Path", $reply);
                $mail->setHeader("Reply-To", $reply);
            }
            $result = $mail->send(array($to));
            //print $result;
        } else {
            @mail($to, $subject, $message, $headers);
        }
    } else {
        global $Sendgrid_Email, $Sendgrid_Pass;
        $transport = Swift_SmtpTransport::newInstance('smtp.sendgrid.net', 25)->setUsername($Sendgrid_Email)->setPassword($Sendgrid_Pass);
        //Create the Mailer using your created Transport
        $mailer = Swift_Mailer::newInstance($transport);
        $orig_msg = $message;
        //Create a message
        $message = Swift_Message::newInstance($subject)->setFrom(array($from_email => $from_name))->setTo(array($to_email => $to_name));
        $message->setSender($from_email);
        $message->setBody($orig_msg, 'text/html');
        if ($reply) {
            $message->setReplyTo($reply);
        }
        if ($cc_email) {
            $message->setCc($cc_email);
        }
        if ($bcc_email) {
            $message->addBcc($bcc_email);
        }
        //Send the message
        $result = $mailer->send($message);
    }
}
开发者ID:baltincsoft,项目名称:VarnerCC,代码行数:79,代码来源:functions.php

示例7: prepareEmail

 /**
  * Enter description here...
  *
  * @param htmlMimeMail $mail
  * @param unknown_type $fromAdress
  * @param unknown_type $fromName
  * @return unknown
  */
 public function prepareEmail(htmlMimeMail $mail, $fromAdress, $fromName)
 {
     // Adds attachments
     foreach ($this->attachments as $attach) {
         $mail->addAttachment($attach['body'], $attach['name'], $attach['c_type'], $attach['encoding']);
     }
     // Subject, To, Cc
     $mail->setSubject($this->subject);
     $to = (array) $this->to;
     if (!empty($this->cc)) {
         $mail->setCc($this->cc);
     }
     // Bcc
     $bcc = $this->cci;
     $alwaysBcc = CopixConfig::get('|mailAlwaysBcc');
     if (!empty($alwaysBcc)) {
         $bcc = empty($bcc) ? $alwaysBcc : "{$alwaysBcc}; {$bcc}";
     }
     if (!empty($bcc)) {
         $mail->setBcc($bcc);
     }
     // Adresse de retour
     $fromAdress = $fromAdress == null ? $this->from : $fromAdress;
     $fromName = $fromName == null ? $this->fromName : $fromName;
     $mail->setFrom('"' . $fromName . '" <' . $fromAdress . '>');
     return $to;
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:35,代码来源:CopixEMailer.class.php


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