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


PHP htmlMimeMail::addAttachment方法代码示例

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


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

示例1: send

 public static function send($from, $to, $subject, $body, array $attachments = null, array $headers = null)
 {
     if (empty($to)) {
         Logger::trace("mail not sent: no recipients: {$subject}");
         return;
     }
     $config = Context::last()->config;
     if (empty($from)) {
         if (!($from = $config->get('modules/mail/from'))) {
             $from = "Molinos.CMS <no-reply@" . MCMS_HOST_NAME . ">";
         }
     }
     if (strstr($body, '<html>') === false) {
         $body = '<html><head><title>' . html::plain($subject) . '</title></head><body>' . $body . '</body></html>';
     }
     if (!is_array($to)) {
         $to = preg_split('/, */', $to, -1, PREG_SPLIT_NO_EMPTY);
     }
     Logger::log(sprintf('to=%s, subject=%s', join(',', $to), $subject), 'mail');
     $mail = new htmlMimeMail();
     if ('smtp' == ($transport = ($server = $config->get('modules/mail/server')) ? 'smtp' : 'mail')) {
         $mail->setSMTPParams($server);
     }
     $mail->setFrom($from);
     $mail->setSubject($subject);
     $mail->setHtml(self::fixhtml($body));
     $mail->setTextCharset('UTF-8');
     $mail->setTextEncoding('base64');
     $mail->setHTMLCharset('UTF-8');
     $mail->setHTMLEncoding('UTF-8');
     $mail->setHeadCharset('UTF-8');
     foreach ((array) $attachments as $file) {
         $mail->addAttachment($file['data'], $file['name'], $file['type']);
     }
     foreach ((array) $headers as $k => $v) {
         if (!empty($v)) {
             $mail->setHeader($k, $v);
         }
     }
     return $mail->send($to, $transport);
 }
开发者ID:umonkey,项目名称:molinos-cms,代码行数:41,代码来源:class.bebopmimemail.php

示例2: htmlMimeMail

 function mail_send($email_from, $subject, $sendto_email, $html_body, $plain_body, $randpath, $randfile)
 {
     $file = $html_mime_mail = new htmlMimeMail();
     $html_mime_mail->setFrom($email_from);
     $html_mime_mail->setSubject($subject);
     $html_mime_mail->setHtml($html_body, $plain_body);
     if ($randpath != '' && $randfile != '') {
         $html_mime_mail->addAttachment($html_mime_mail->getFile($randpath . $randfile), $randfile);
     }
     $success = $html_mime_mail->send(array($sendto_email), 'smtp');
     return $success;
 }
开发者ID:trungjc,项目名称:collegeprospectnetwork,代码行数:12,代码来源:common_functions.php

示例3: array

<?php

/* $Revision: 1.7 $ */
/*Now this is not secure so a malicious user could send multiple emails of the report to the intended receipients

The intention is that this script is called from cron at intervals defined with a command like:

/usr/bin/wget http://localhost/web-erp/MailSalesReport.php

The configuration of this script requires the id of the sales analysis report to send
and an array of the receipients and the company database to use*/
/*The Sales report to send */
$ReportID = 4;
/*The company database to use */
$DatabaseName = 'weberp';
/*The people to receive the emailed report */
$Recipients = array('"Root" <root@localhost>', '"someone else" <someoneelese@sowhere.com>');
/* ----------------------------------------------------------------------------------------------*/
$AllowAnyone = true;
include 'includes/session.inc';
include 'includes/ConstructSQLForUserDefinedSalesReport.inc';
include 'includes/CSVSalesAnalysis.inc';
include 'includes/htmlMimeMail.php';
$mail = new htmlMimeMail();
$attachment = $mail->getFile($_SESSION['reports_dir'] . '/SalesAnalysis.csv');
$mail->setText(_('Please find herewith the comma seperated values sales report'));
$mail->addAttachment($attachment, 'SalesAnalysis.csv', 'application/csv');
$mail->setSubject(_('Sales Analysis') . ' - ' . _('CSV Format'));
$mail->setFrom($_SESSION['CompanyRecord']['coyname'] . '<' . $_SESSION['CompanyRecord']['email'] . '>');
$result = $mail->send($Recipients);
开发者ID:xuxudodo,项目名称:weberp-cvs,代码行数:30,代码来源:MailSalesReport_csv.php

示例4: time

     } else {
         $tm = time();
         $db->query("update subs_lists set lastsend='{$tm}' where id={$data['lid']}");
         $db->query("update subs_messages set date_sent='{$tm}' where id={$id}");
         header("Location: ?type=mod&mod_id=2&t=m&a=v&s={$i}");
     }
 }
 if ($a == 't') {
     $conf = conf();
     $db = new sql();
     $db->connect();
     $db->query("select * from subs_messages where id={$id}");
     $data = $db->fetch_array($db->result);
     $mail = new htmlMimeMail();
     if ($data["file"]) {
         $mail->addAttachment($mail->getFile("dl/" . $data["file"]), $data["file"]);
     }
     eval("\$conf[email_from]=\"" . $conf["email_from"] . "\";");
     $mail->setSubject($data["subj"]);
     $mail->setFrom($conf["email_from"]);
     $db->query("select subs_users.* from subs_users where email='" . $conf["test_email"] . "'");
     $lid = $data["lid"];
     $d = $db->fetch_array($db->result);
     $data["name"] = $d["name"] ? ", " . $d["name"] : "";
     $e = $d["email"];
     $x = $d["salt"];
     if ($data["text"]) {
         eval("\$text=\"" . $conf["text"] . "\";");
     }
     if ($data["html"]) {
         $content = $data["html"];
开发者ID:BackupTheBerlios,项目名称:sitexs,代码行数:31,代码来源:subcribe.class.php

示例5: htmlMimeMail

    $YPos -= 2 * $line_height;
}
$YPos -= 2 * $line_height;
/*Print out the grand totals */
$LeftOvers = $pdf->addTextWrap(80, $YPos, 260 - $Left_Margin, $FontSize, _('Grand Total Value'), 'right');
$DisplayTotalVal = locale_money_format($Tot_Val, $_SESSION['CompanyRecord']['currencydefault']);
$LeftOvers = $pdf->addTextWrap(500, $YPos, 60, $FontSize, $DisplayTotalVal, 'right');
if ($_POST['DetailedReport'] == 'Yes') {
    $pdf->line($Left_Margin, $YPos + $line_height - 2, $Page_Width - $Right_Margin, $YPos + $line_height - 2);
    $YPos -= 2 * $line_height;
}
if ($ListCount == 0) {
    $title = _('Print Inventory Valuation Error');
    include 'includes/header.inc';
    echo '<br />' . _('There were no items with any value to print out for the location specified');
    echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>';
    include 'includes/footer.inc';
    exit;
    // Javier: needs check
} else {
    include 'includes/htmlMimeMail.php';
    $pdf->Output($_SESSION['reports_dir'] . '/InventoryReport.pdf', 'F');
    $pdf->__destruct();
    $mail = new htmlMimeMail();
    $attachment = $mail->getFile($_SESSION['reports_dir'] . '/InventoryReport.pdf');
    $mail->setText(_('Please find herewith the stock valuation report'));
    $mail->setSubject(_('Inventory Valuation Report'));
    $mail->addAttachment($attachment, 'InventoryReport.pdf', 'application/pdf');
    $mail->setFrom($_SESSION['CompanyRecord']['coyname'] . "<" . $_SESSION['CompanyRecord']['email'] . ">");
    $result = $mail->send($Recipients);
}
开发者ID:sunilburli,项目名称:webERP-Medical,代码行数:31,代码来源:MailInventoryValuation.php

示例6: htmlMimeMail

        $FromTransNo++;
    }
}
/* end loop to print invoices */
if (($InvOrCredit == 'Invoice' or $InvOrCredit == 'Credit') and isset($PrintPDF)) {
    if (isset($_GET['Email'])) {
        //email the invoice to address supplied
        include 'includes/header.inc';
        include 'includes/htmlMimeMail.php';
        $mail = new htmlMimeMail();
        $FileName = $_SESSION['reports_dir'] . '/' . $_SESSION['DatabaseName'] . '_' . $InvOrCredit . '_' . $_GET['FromTransNo'] . '.pdf';
        $pdf->Output($FileName, 'F');
        $Attachment = $mail->getFile($FileName);
        $mail->setText(_('Please find attached') . ' ' . $InvOrCredit . ' ' . $_GET['FromTransNo']);
        $mail->SetSubject($InvOrCredit . ' ' . $_GET['FromTransNo']);
        $mail->addAttachment($Attachment, $FileName, 'application/pdf');
        $mail->setFrom($_SESSION['CompanyRecord']['coyname'] . ' <' . $_SESSION['CompanyRecord']['email'] . '>');
        $result = $mail->send(array($_GET['Email']));
        unlink($FileName);
        //delete the temporary file
        $title = _('Emailing') . ' ' . $InvOrCredit . ' ' . _('Number') . ' ' . $FromTransNo;
        include 'includes/header.inc';
        echo '<br />' . $InvOrCredit . ' ' . _('number') . ' ' . $_GET['FromTransNo'] . ' ' . _('has been emailed to') . ' ' . $_GET['Email'];
        include 'includes/footer.inc';
        exit;
    } else {
        $pdf->OutputD($_SESSION['DatabaseName'] . '_' . $InvOrCredit . '_' . $_GET['FromTransNo'] . '.pdf');
    }
    $pdf->__destruct();
} else {
    /*The option to print PDF was not hit */
开发者ID:sunilburli,项目名称:webERP-Medical,代码行数:31,代码来源:KCMCPrintInsuranceInvoice.php

示例7: array

and an array of the receipients */
/*The following three variables need to be modified for the report - the company database to use and the receipients */
/*The Sales report to send */
$_GET['ReportID'] = 2;
/*The company database to use */
$DatabaseName = 'kwamojademo';
/*The people to receive the emailed report */
$Recipients = array('"Root" <root@localhost>', '"' . _('someone else') . '" <someoneelese@sowhere.com>');
$AllowAnyone = true;
include 'includes/session.inc';
include 'includes/ConstructSQLForUserDefinedSalesReport.inc';
include 'includes/PDFSalesAnalysis.inc';
include 'includes/htmlMimeMail.php';
$mail = new htmlMimeMail();
if ($Counter > 0) {
    /* the number of lines of the sales report is more than 0  ie there is a report to send! */
    $pdfcode = $pdf->output();
    $fp = fopen($_SESSION['reports_dir'] . '/SalesReport.pdf', 'wb');
    fwrite($fp, $pdfcode);
    fclose($fp);
    $attachment = $mail->getFile($_SESSION['reports_dir'] . '/SalesReport.pdf');
    $mail->setText(_('Please find herewith sales report'));
    $mail->SetSubject(_('Sales Analysis Report'));
    $mail->addAttachment($attachment, 'SalesReport.pdf', 'application/pdf');
    $mail->setFrom($_SESSION['CompanyRecord']['coyname'] . '<' . $_SESSION['CompanyRecord']['email'] . '>');
    $result = $mail->send($Recipients);
} else {
    $mail->setText(_('Error running automated sales report number') . ' ' . $ReportID);
    $mail->setFrom($_SESSION['CompanyRecord']['coyname'] . '<' . $_SESSION['CompanyRecord']['email'] . '>');
    $result = $mail->send($Recipients);
}
开发者ID:BackupTheBerlios,项目名称:kwamoja,代码行数:31,代码来源:MailSalesReport.php

示例8: class

$text = $mail->getFile('example.txt');
$html = $mail->getFile('example.html');
/*
 * Add the text, html and embedded images.
 * The name (background.gif in this case)
 * of the image should match exactly
 * (case-sensitive) to the name in the html.
 */
$mail->setHtml($html, $text);
$mail->addHtmlImage($background, 'background.gif', 'image/gif');
/*
 * This is used to add an attachment to
 * the email. Due to above, the $attachment
 * variable contains the example zip file.
 */
$mail->addAttachment($attachment, 'example.zip', 'application/zip');
/*
 * Set the return path of the message
 */
$mail->setReturnPath('joe@example.com');
/**
 * Set some headers
 */
$mail->setFrom('"Joe" <joe@example.com>');
$mail->setSubject('Test mail');
$mail->setHeader('X-Mailer', 'HTML Mime mail class (http://www.phpguru.org)');
/**
 * Send it using SMTP. If you're using Windows you should *always* use
 * the smtp method of sending, as the mail() function is buggy.
 */
$result = $mail->send(array('postmaster@localhost'), 'smtp');
开发者ID:4v4t4r,项目名称:CTF-LCC,代码行数:31,代码来源:example.1.php

示例9: COUNT

    $sql = "SELECT COUNT(salesorderdetails.orderno)\n\t\tFROM salesorderdetails INNER JOIN debtortrans\n\t\t\tON salesorderdetails.orderno=debtortrans.order_ INNER JOIN stockmaster\n\t\t\tON salesorderdetails.stkcode=stockmaster.stockid INNER JOIN salesorders\n\t\t\tON salesorderdetails.orderno = salesorders.orderno INNER JOIN locationusers\n\t\t\tON locationusers.loccode=salesorders.fromstkloc AND locationusers.userid='" . $_SESSION['UserID'] . "' AND locationusers.canview=1\n\t\tWHERE debtortrans.trandate>='" . FormatDateForSQL($_POST['FromDate']) . "'\n\t\tAND debtortrans.trandate <='" . FormatDateForSQL($_POST['ToDate']) . "'\n\t\tAND stockmaster.categoryid='" . $_POST['CategoryID'] . "'";
} elseif ($_POST['CategoryID'] == 'All' and $_POST['Location'] != 'All') {
    $sql = "SELECT COUNT(salesorderdetails.orderno)\n\t\tFROM salesorderdetails INNER JOIN debtortrans\n\t\t\tON salesorderdetails.orderno=debtortrans.order_ INNER JOIN salesorders\n\t\t\tON salesorderdetails.orderno = salesorders.orderno INNER JOIN locationusers\n\t\t\tON locationusers.loccode=salesorders.fromstkloc AND locationusers.userid='" . $_SESSION['UserID'] . "' AND locationusers.canview=1\n\t\tWHERE debtortrans.trandate>='" . FormatDateForSQL($_POST['FromDate']) . "'\n\t\tAND debtortrans.trandate <='" . FormatDateForSQL($_POST['ToDate']) . "'\n\t\tAND salesorders.fromstkloc='" . $_POST['Location'] . "'";
} elseif ($_POST['CategoryID'] != 'All' and $_POST['Location'] != 'All') {
    $sql = "SELECT COUNT(salesorderdetails.orderno)\n\t\tFROM salesorderdetails INNER JOIN debtortrans ON salesorderdetails.orderno=debtortrans.order_\n\t\t\tINNER JOIN salesorders ON salesorderdetails.orderno = salesorders.orderno\n\t\t\tINNER JOIN locationusers ON locationusers.loccode=salesorders.fromstkloc AND locationusers.userid='" . $_SESSION['UserID'] . "' AND locationusers.canview=1\n\t\t\tINNER JOIN stockmaster ON salesorderdetails.stkcode = stockmaster.stockid\n\t\tWHERE salesorders.fromstkloc ='" . $_POST['Location'] . "'\n\t\tAND categoryid='" . $_POST['CategoryID'] . "'\n\t\tAND trandate >='" . FormatDateForSQL($_POST['FromDate']) . "'\n\t\tAND trandate <= '" . FormatDateForSQL($_POST['ToDate']) . "'";
}
$ErrMsg = _('Could not retrieve the count of sales order lines in the period under review');
$result = DB_query($sql, $ErrMsg);
$myrow = DB_fetch_row($result);
$YPos -= $line_height;
$LeftOvers = $pdf->addTextWrap($Left_Margin, $YPos, 200, $FontSize, _('Total number of order lines') . ' ' . locale_number_format($myrow[0]), 'left');
$YPos -= $line_height;
$LeftOvers = $pdf->addTextWrap($Left_Margin, $YPos, 200, $FontSize, _('DIFOT') . ' ' . locale_number_format((1 - $TotalDiffs / $myrow[0]) * 100, 2) . '%', 'left');
$ReportFileName = $_SESSION['DatabaseName'] . '_DIFOT_' . date('Y-m-d') . '.pdf';
$pdf->OutputD($ReportFileName);
if ($_POST['Email'] == 'Yes') {
    $pdf->Output($_SESSION['reports_dir'] . '/' . $ReportFileName, 'F');
    include 'includes/htmlMimeMail.php';
    $mail = new htmlMimeMail();
    $attachment = $mail->getFile($_SESSION['reports_dir'] . '/' . $ReportFileName);
    $mail->setText(_('Please find herewith DIFOT report from') . ' ' . $_POST['FromDate'] . ' ' . _('to') . ' ' . $_POST['ToDate']);
    $mail->addAttachment($attachment, 'DIFOT.pdf', 'application/pdf');
    $mail->setFrom($_SESSION['CompanyRecord']['coyname'] . '<' . $_SESSION['CompanyRecord']['email'] . '>');
    if ($_SESSION['SmtpSetting'] == 0) {
        $mail->setFrom($_SESSION['CompanyRecord']['coyname'] . ' <' . $_SESSION['CompanyRecord']['email'] . '>');
        $result = $mail->send(array($_SESSION['FactoryManagerEmail']));
    } else {
        $result = SendmailBySmtp($mail, array($_SESSION['FactoryManagerEmail']));
    }
}
$pdf->__destruct();
开发者ID:fgaudenzi,项目名称:webERP-bootstrap,代码行数:31,代码来源:PDFDIFOT.php

示例10: htmlMimeMail

 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"]) {
         check_ticket('webmail');
         $a3 = $mail->getFile('temp/mail_attachs/' . $_REQUEST["attach3file"]);
         $mail->addAttachment($a3, $_REQUEST["attach3"], $_REQUEST["attach3type"]);
         @unlink('temp/mail_attachs/' . $_REQUEST["attach3file"]);
     }
     $mail->setSMTPParams($current["smtp"], $current["smtpPort"], '', $current["useAuth"], $current["username"], $current["pass"]);
开发者ID:noikiy,项目名称:owaspbwa,代码行数:31,代码来源:tiki-webmail.php

示例11: elseif

         $NoLines = $LineNumber;
     } elseif ($LineDetails['section'] == 'Summary') {
         $MsgLineText = $LineDetails['linetext'];
         include 'includes/EDIVariableSubstitution.inc';
     }
 }
 /*end while there are message lines to parse and substitute vbles for */
 fclose($fp);
 /*close the file at the end of each transaction */
 //DB_query("UPDATE DebtorTrans SET EDISent=1 WHERE ID=" . $TransDetails['ID'],$db);
 /*Now send the file using the customer transport */
 if ($CustDetails['editransport'] == 'email') {
     $mail = new htmlMimeMail();
     $attachment = $mail->getFile($_SESSION['EDI_MsgPending'] . "/EDI_INV_" . $EDITransNo);
     $mail->SetSubject('EDI Invoice/Credit Note ' . $EDITransNo);
     $mail->addAttachment($attachment, 'EDI_INV_' . $EDITransNo, 'application/txt');
     $mail->setFrom($_SESSION['CompanyRecord']['coyname'] . '<' . $_SESSION['CompanyRecord']['email'] . '>');
     if ($_SESSION['SmtpSetting'] == 0) {
         $mail->setFrom($_SESSION['CompanyRecord']['coyname'] . '<' . $_SESSION['CompanyRecord']['email'] . '>');
         $MessageSent = $mail->send(array($CustDetails['ediaddress']));
     } else {
         $MessageSent = SendmailBySmtp($mail, array($CustDetails['ediaddress']));
     }
     if ($MessageSent == True) {
         echo '<br /><br />';
         prnMsg(_('EDI Message') . ' ' . $EDITransNo . ' ' . _('was successfully emailed'), 'success');
     } else {
         echo '<br /><br />';
         prnMsg(_('EDI Message') . ' ' . $EDITransNo . _('could not be emailed to') . ' ' . $CustDetails['ediaddress'], 'error');
     }
 } else {
开发者ID:strollClouds,项目名称:snkStudy,代码行数:31,代码来源:EDISendInvoices.php

示例12: prnMsg

    prnMsg(_('There are no members of the Sales Analysis Report Recipients email group'), 'warn');
    include 'includes/footer.inc';
    exit;
}
include 'includes/ConstructSQLForUserDefinedSalesReport.inc';
include 'includes/PDFSalesAnalysis.inc';
include 'includes/htmlMimeMail.php';
$mail = new htmlMimeMail();
if ($Counter > 0) {
    $pdf->Output($_SESSION['reports_dir'] . '/SalesAnalysis_' . date('Y-m-d') . '.pdf', 'F');
    //save to file
    $pdf->__destruct();
    $attachment = $mail->getFile($_SESSION['reports_dir'] . '/SalesAnalysis_' . date('Y-m-d') . '.pdf');
    $mail->setText(_('Please find herewith sales report'));
    $mail->SetSubject(_('Sales Analysis Report'));
    $mail->addAttachment($attachment, 'SalesAnalysis_' . date('Y-m-d') . '.pdf', 'application/pdf');
    if ($_SESSION['SmtpSetting'] == 0) {
        $mail->setFrom($_SESSION['CompanyRecord']['coyname'] . '<' . $_SESSION['CompanyRecord']['email'] . '>');
        $result = $mail->send($Recipients);
    } else {
        $result = SendmailBySmtp($mail, $Recipients);
    }
} else {
    $mail->setText(_('Error running automated sales report number') . ' ' . $ReportID);
    if ($_SESSION['SmtpSetting'] == 0) {
        $mail->setFrom($_SESSION['CompanyRecord']['coyname'] . '<' . $_SESSION['CompanyRecord']['email'] . '>');
        $result = $mail->send($Recipients);
    } else {
        $result = SendmailBySmtp($mail, $Recipients);
    }
}
开发者ID:rrsc,项目名称:KwaMoja,代码行数:31,代码来源:MailSalesReport.php

示例13: 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

示例14: stripslashes

switch (0) {
    case 0:
        //Le fichier n'est pas à envoyer donc on l'affiche à l'écran
        $pdf->Output();
        //Read the FPDF.org manual to know the other options
        break;
    case 1:
        //Le fichier pdf doit être envoyé par mail
        //Définition des Variables
        //Nom du fichier pièce jointe
        $tmp_filename = "Agis-FTMP" . $id_dossier_matiere_premiere . "v" . $version_matiere_premiere . ".pdf";
        $tmp_pdf = $pdf->Output($tmp_file, "S");
        $text = stripslashes($text);
        //Création du mail
        $mail = new htmlMimeMail();
        $mail->addAttachment($tmp_pdf, $tmp_filename, 'application/pdf');
        $mail->setFrom($mail_user);
        $mail->setSubject("Agis: Fiche Technique Article");
        $mail->setText($text);
        $result = $mail->send(array($adresse_to), 'smtp');
        //       echo $adresse_to;
        if (!$result) {
            print_r($mail->errors);
        } else {
            $titre = "Envoi Réussi !";
            $message = "Votre mail à bien été envoyé à:<br>{$adresse_to}";
            $redirection = "";
            Lib::showMessage($titre, $message, $redirection);
            //echo 'Mail sent!';
        }
        //echo $GLOBALS['smtp_ip'];
开发者ID:SalokineTerata,项目名称:intranet,代码行数:31,代码来源:pdf.php

示例15: date

        /*Then set up a new page */
        $PageNumber++;
        include 'includes/PDFChequeListingPageHeader.inc';
    }
    /*end of new page header  */
}
/* end of while there are customer receipts in the batch to print */
$YPos -= $line_height;
$LeftOvers = $pdf->addTextWrap($Left_Margin, $YPos, 60, $FontSize, locale_money_format($TotalCheques, $Currency), 'right');
$LeftOvers = $pdf->addTextWrap($Left_Margin + 65, $YPos, 300, $FontSize, _('TOTAL') . ' ' . $Currency . ' ' . _('CHEQUES'), 'left');
$ReportFileName = $_SESSION['DatabaseName'] . '_ChequeListing_' . date('Y-m-d') . '.pdf';
$pdf->OutputD($ReportFileName);
//UldisN
$pdf->__destruct();
//UldisN
if ($_POST['Email'] == 'Yes') {
    if (file_exists($_SESSION['reports_dir'] . '/' . $ReportFileName)) {
        unlink($_SESSION['reports_dir'] . '/' . $ReportFileName);
    }
    $fp = fopen($_SESSION['reports_dir'] . '/' . $ReportFileName, 'wb');
    fwrite($fp, $pdfcode);
    fclose($fp);
    include 'includes/htmlMimeMail.php';
    $mail = new htmlMimeMail();
    $attachment = $mail->getFile($_SESSION['reports_dir'] . '/' . $ReportFileName);
    $mail->setText(_('Please find herewith payments listing from') . ' ' . $_POST['FromDate'] . ' ' . _('to') . ' ' . $_POST['ToDate']);
    $mail->addAttachment($attachment, 'PaymentListing.pdf', 'application/pdf');
    $mail->setFrom(array('"' . $_SESSION['CompanyRecord']['coyname'] . '" <' . $_SESSION['CompanyRecord']['email'] . '>'));
    /* $ChkListingRecipients defined in config.php */
    $result = $mail->send($ChkListingRecipients);
}
开发者ID:sunilburli,项目名称:webERP-Medical,代码行数:31,代码来源:PDFChequeListing.php


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