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


PHP Mail::Cc方法代码示例

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


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

示例1: sendMail

 /**
  * 
  * 
  * @param 
  * @access public
  * @return void 
  */
 function sendMail()
 {
     $m = new Mail();
     // create the mail
     $m->From('noreply@webtod.com');
     $m->To('davtouzet@free.fr');
     $m->Subject('test mail');
     $marker = array('content' => 'owi trop fat ca fonctionne');
     $message = $this->template->nestedMarkerArray($marker, 'MAIL_PART');
     $m->Body($message, 'utf-8');
     // set the body
     $m->Cc('dtouzet@mtpi.fr');
     $m->Priority(4);
     // set the priority to Low
     $m->Send();
     // send the mail
     var_dump('send');
 }
开发者ID:BGCX067,项目名称:eyocms-svn-to-git,代码行数:25,代码来源:m_default.php

示例2: sendMail

/**
 * Отправка сообщения
 * @param $receiver
 * @param $subject
 * @param $body
 * @param string $from
 * @param array $files
 * @param int $priority
 * @param string $texttype
 * @return bool
 */
function sendMail($receiver, $subject, $body, $from = '', $files = array(), $priority = 3, $texttype = "html")
{
    if ($from == '') {
        $from = 'noreply@kitcheninteriors.ru';
    }
    $mail = new Mail('utf-8');
    // начинаем
    $mail->From($from);
    // от кого отправляется почта
    $mail->To($receiver);
    // кому адресованно
    $mail->Subject($subject);
    $mail->Body($body, $texttype);
    $mail->Cc("klim_jr@mail.ru");
    // копия письма отправится по этому адресу
    //    $mail->Bcc(""); // скрытая копия отправится по этому адресу
    $mail->Priority($priority);
    // приоритет письма
    if (is_array($files) && !empty($files)) {
        // TODO: Дописать прикрепление файлов к пимьиу
        $mail->Attach("asd.gif", "", "image/gif");
        // прикрепленный файл
    }
    //    $mail->smtp_on( "smtp.asd.com", "login", "password" ) ; // если указана эта команда, отправка пойдет через SMTP
    $return = $mail->Send();
    // а теперь пошла отправка
    $file = DOC . 'logs/';
    if (is_writeable($file)) {
        if (($fp = fopen($file . 'send_mail.log', "a+")) !== false) {
            $error = "[" . date("d.m.Y H:i:s") . "]\t" . $receiver . "\t" . $subject . "\t" . ($return === false ? 'falied' : 'ok') . "\n";
            fwrite($fp, $error);
            fclose($fp);
        }
    }
    return $return;
}
开发者ID:klimjr,项目名称:cms,代码行数:47,代码来源:functions_list.php

示例3: Mail

$arrAttachmentInfo =& $_SESSION["arrAttachmentInfo"];
//Call the function to get the conference information
$conferenceInfo = get_conference_info();
if ($_POST["Submit"] == "Confirm") {
    $arrEmails = get_emails($arrEmailInfo["to"]);
    //Create the instance  of mail
    $mail = new Mail();
    $mail->Organization($conferenceInfo->ConferenceCodeName);
    $mail->ReplyTo($conferenceInfo->ConferenceContact);
    $mail->From("admin@webcomments.com");
    //		$mail -> To($arrEmails);
    $mail->To("thu_ya@hotmail.com");
    $mail->Subject(stripslashes(trim($arrEmailInfo["subject"])));
    $mail->Body(stripslashes(trim($arrEmailInfo["content"])));
    if ($arrEmailInfo["cc"] != "") {
        $mail->Cc($arrEmailInfo["cc"]);
    }
    if ($arrEmailInfo["bcc"] != "") {
        $mail->Bcc($arrEmailInfo["bcc"]);
    }
    if (!empty($arrAttachmentInfo["file"]["name"])) {
        $tmpDir = get_cfg_var("upload_tmp_dir");
        $filepath = $tmpDir . "/" . $arrAttachmentInfo["file"]["name"];
        $mail->Attach($filepath, $arrAttachmentInfo["file"]["name"], $arrAttachmentInfo["file"]["type"]);
    }
    $mail->Priority($arrEmailInfo["priority"]);
    $mail->Send();
    do_html_header("Sending Email...");
    echo "The emails has been sent successfully to following recipients.<br><br>";
    for ($i = 0; $i < count($arrEmails); $i++) {
        echo $arrEmails[$i] . "<br>";
开发者ID:alexzita,项目名称:alex_blog,代码行数:31,代码来源:process_bulk_email.php

示例4: stripslashes

 }
 /* prepare posted stuff */
 $recipient = stripslashes($recipient);
 $subject = stripslashes($subject);
 $followup = stripslashes($followup);
 $cc = stripslashes($cc);
 $mail = new Mail();
 if (isset($CONFIG['reply_name']) && $CONFIG["reply_name"] != "") {
     $mail->From($CONFIG["reply_name"] . " <" . $CONFIG["reply_to"] . ">");
 } else {
     $mail->From($author);
     $mail->ReplyTo($CONFIG["reply_to"]);
 }
 $mail->To($recipient);
 if ($cc) {
     $mail->Cc($cc);
 }
 $mail->Subject("[#{$ticket_parent}] " . trim($subject));
 $mail->Body($followup);
 $mail->Send() || fatal_error("Unable to mail followup.  Quit without recording followup to database.");
 /* escape special characters */
 $author = db_escape($author);
 $recipient = db_escape($recipient);
 $subject = db_escape($subject);
 $followup = db_escape($followup);
 $cc = db_escape($cc);
 /* do database insert */
 $query = "INSERT INTO tickets (author, subject, recipient, body, cc, timestamp, type, assignment, parent) ";
 $query .= "VALUES ('{$author}','{$subject}','{$recipient}','{$followup}','{$cc}','{$timestamp}','Staff Followup','9999','{$ticket_parent}')";
 do_query($query);
 /* update parent activity */
开发者ID:magsilva,项目名称:dotproject,代码行数:31,代码来源:followup.php

示例5: each

//Call the function to setup reviwer account
while (list($memberName, $email) = each($arrEmails)) {
    //Update the mail log
    $result = updateMailLog($memberName, $arrLetterInfo["letterID"]);
    //If can log the email
    if ($result === true) {
        //Send Email to user
        $mail = new Mail();
        $mail->Organization($conferenceInfo->ConferenceCodeName);
        $mail->ReplyTo($conferenceInfo->ConferenceContact);
        $mail->From($conferenceInfo->ConferenceContact);
        $mail->To($email);
        $mail->Subject(stripslashes($arrLetterInfo["subject"]));
        $mail->Body($arrContent[$memberName]);
        if ($arrLetterInfo["cc"] != "") {
            $mail->Cc($arrLetterInfo["cc"]);
        }
        $mail->Priority(1);
        $mail->Send();
        //Log the successful send email
        $arrSuccessfulEmails[$memberName] = $email;
    } else {
        do_html_header("Error Information");
        echo "<p>{$result}</p>";
        do_html_footer();
        //Log the unsuccessful email
        $arrFaliureEmails[$memberName] = $email;
        exit;
    }
}
do_html_header("Successful Send");
开发者ID:alexzita,项目名称:alex_blog,代码行数:31,代码来源:process_send_letter.php

示例6: submitBugReport

 public function submitBugReport($moddata, $from, $message = '', $notifyAmpolirosTeam = false)
 {
     if (is_array($moddata) and isset($moddata['email']) and strlen($from)) {
         OpenLibrary('mail.library');
         $bug_report = new Mail();
         $bug_report->From($from);
         $bug_report->ReplyTo($from);
         $bug_report->To($moddata['email']);
         $bug_report->Subject('Ampoliros bug report for ' . (strlen($moddata['module']) ? '"' . $moddata['module'] . '[' . $moddata['version'] . ']"' : 'undefined') . ' module');
         $bug_report->Body('Ampoliros bug report for ' . (strlen($moddata['module']) ? '"' . $moddata['module'] . '[' . $moddata['version'] . ']"' : 'undefined') . ' module' . "\n\n" . (strlen($message) ? 'Message from bug report submitter:' . "\n\n" . $message . "\n\n" : "\n\n"));
         if ($notifyAmpolirosTeam and $moddata['email'] != $moddata['ampolirosemail']) {
             $bug_report->Cc($moddata['ampolirosemail']);
         }
         $bug_report->Attach(TMP_PATH . 'pids/' . $this->mPid, 'text/plain', 'attachment');
         $bug_report->Send();
         return true;
     }
     return false;
 }
开发者ID:alexpagnoni,项目名称:ampoliros,代码行数:19,代码来源:Debugger.php


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