本文整理汇总了PHP中htmlMimeMail::setSubject方法的典型用法代码示例。如果您正苦于以下问题:PHP htmlMimeMail::setSubject方法的具体用法?PHP htmlMimeMail::setSubject怎么用?PHP htmlMimeMail::setSubject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类htmlMimeMail
的用法示例。
在下文中一共展示了htmlMimeMail::setSubject方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: template
function m_sendMail()
{
$libFunc = new c_libFunctions();
$this->ObTpl = new template();
$this->ObTpl->set_file("TPL_VAR_CMS", MODULES_PATH . "default/templates/main/contactmail.tpl.htm");
$this->ObTpl->set_var("TPL_VAR_NAME", $this->libFunc->m_displayContent($this->request['sName']));
$this->ObTpl->set_var("TPL_VAR_ADDRESS1", $this->libFunc->m_displayContent($this->request['sAddress1']));
$this->ObTpl->set_var("TPL_VAR_ADDRESS2", $this->libFunc->m_displayContent($this->request['sAddress2']));
$this->ObTpl->set_var("TPL_VAR_PHONE", $this->libFunc->m_displayContent($this->request['sWorkPhone']));
$this->ObTpl->set_var("TPL_VAR_COUNTRY", $this->libFunc->m_displayContent($this->request['sCountry']));
$this->ObTpl->set_var("TPL_VAR_COMMENTS", nl2br($this->libFunc->m_displayContent($this->request['sComments'])));
$message = "========================================<br />";
$message .= "Contact request from " . SITE_NAME . "<br />";
$message .= "========================================<br />";
$message .= $this->ObTpl->parse("return", "TPL_VAR_CMS");
$this->request['sName'] . "<" . $this->libFunc->m_displayContent1($this->request['sEmail']) . ">";
$obMail = new htmlMimeMail();
$obMail->setReturnPath(ADMIN_EMAIL);
$this->libFunc->m_displayContent($this->request['sName']) . "<" . $this->libFunc->m_displayContent1($this->request['sEmail']) . ">";
$obMail->setFrom($this->libFunc->m_displayContent1("\"" . $this->request['sName'] . "\"") . "<" . $this->libFunc->m_displayContent1($this->request['sEmail']) . ">");
$obMail->setSubject("Contact request from " . SITE_NAME);
$obMail->setCrlf("\n");
//to handle mails in Outlook Express
$htmlcontent = $message;
$txtcontent = preg_replace("/<([^>]+)>/", "", preg_replace("/<br(\\/{0,1})>/", "\r\n", $message));
$obMail->setHtml($htmlcontent, $txtcontent);
$obMail->buildMessage();
$result = $obMail->send(array(ENQUIRY_EMAIL));
}
示例2: 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']));
}
}
}
示例3: sendHTMLMail
function sendHTMLMail($from, $to, $subject, $body)
{
$mail = new htmlMimeMail();
$mail->setFrom($from);
$mail->setSubject($subject);
$mail->setHTML($body);
if (is_array($to)) {
$result = $mail->send($to);
} else {
$result = $mail->send(array($to));
}
return $result;
}
示例4: time
function m_reviewAdd()
{
$this->request['display'] = $this->libFunc->ifSet($this->request, "display");
$timestamp = time();
$this->obDb->query = "SELECT iProdid_PK FROM " . PRODUCTS . " WHERE iProdid_PK='" . $this->request['productid'] . "'";
$rs = $this->obDb->fetchQuery();
if ($this->obDb->record_count > 0) {
#inserting to departments
$this->obDb->query = "SELECT iCustRevid_PK FROM " . REVIEWS . " WHERE iCustomerid_FK='" . $_SESSION['userid'] . "' AND iItemid_FK='" . $this->request['productid'] . "'";
$rs = $this->obDb->fetchQuery();
$rsCnt = $this->obDb->record_count;
if ($rsCnt == 0) {
$this->obDb->query = "INSERT INTO " . REVIEWS . "\n\t\t\t\t\t\t\t\t\t\t(vTitle,vComment,vRank,iDisplay,iItemid_FK,tmDateAdd,iCustomerid_FK,iState) \n\t\t\t\t\t\t\t\t\t\t\tvalues('" . $this->libFunc->m_addToDB($this->request['title']) . "',\n\t\t\t\t\t\t\t\t\t\t\t'" . $this->libFunc->m_addToDB($this->request['comment']) . "',\n\t\t\t\t\t\t\t\t\t\t\t'" . $this->libFunc->m_addToDB($this->request['rank']) . "',\n\t\t\t\t\t\t\t\t\t\t\t'" . $this->request['display'] . "',\n\t\t\t\t\t\t\t\t\t\t\t'" . $this->request['productid'] . "',\n\t\t\t\t\t\t\t\t\t\t\t'{$timestamp}','" . $_SESSION['userid'] . "',1)";
$this->obDb->updateQuery();
} else {
$this->obDb->query = "UPDATE " . REVIEWS . " SET vTitle='" . $this->libFunc->m_addToDB($this->request['title']) . "',\n\t\t\t\t\t\t\t\t\t\tvComment='" . $this->libFunc->m_addToDB($this->request['comment']) . "',\n\t\t\t\t\t\t\t\t\t\tvRank='" . $this->libFunc->m_addToDB($this->request['rank']) . "',\n\t\t\t\t\t\t\t\t\t\tiDisplay='" . $this->request['display'] . "',\n\t\t\t\t\t\t\t\t\t\tiItemid_FK='" . $this->request['productid'] . "',\n\t\t\t\t\t\t\t\t\t\ttmDateAdd='{$timestamp}' WHERE iCustRevid_PK='" . $rs[0]->iCustRevid_PK . "'";
$this->obDb->updateQuery();
}
# additional functionality to e-mail admin on new submission of new product review - MCB, 26/09/2008
$this->obDb->query = "SELECT vFirstName, vLastName FROM " . CUSTOMERS . " WHERE iCustmerid_PK=" . $_SESSION['userid'];
$name_row = $this->obDb->fetchQuery();
$customername = $name_row[0]->vFirstName . " " . $name_row[0]->vLastName;
$obMail = new htmlMimeMail();
$obMail->setReturnPath(ADMIN_EMAIL);
$obMail->setFrom(SITE_NAME . "<" . ADMIN_EMAIL . ">");
$obMail->setSubject("New product review");
$obMail->setCrlf("\n");
//to handle mails in Outlook Express
$message = "Somebody has posted a new product review on your on-line store.<br>Details of this review are listed below.<br><br>";
$message .= $customername . " submitted the following at " . date('g:ia') . " on " . date('l, d F Y') . ":<br><br>";
$message .= $this->libFunc->m_displayContent($this->request['comment']) . "<br><br>";
$message .= "To view this comment, please visit the following URL:<br>";
$message .= "<a href=\"" . SITE_URL . "ecom/index.php?action=ecom.pdetails&mode=" . $this->request['mode'] . "\">" . SITE_URL . "ecom/index.php?action=ecom.pdetails&mode=" . $this->request['mode'] . "</a>";
$htmlcontent = $message;
$txtcontent = preg_replace("/<([^>]+)>/", "", preg_replace("/<br(\\/{0,1})>/", "\r\n", $message));
$obMail->setHtml($htmlcontent, $txtcontent);
$obMail->buildMessage();
if (preg_match("/^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,3})\$/i", ADMIN_EMAIL)) {
$result = $obMail->send(array(ADMIN_EMAIL));
}
}
# redirect on posting and e-mailing of comment ...
$retUrl = $this->libFunc->m_safeUrl(SITE_URL . "ecom/index.php?action=ecom.pdetails&mode=" . $this->request['seotitle']);
$this->libFunc->m_mosRedirect($retUrl);
exit;
}
示例5: 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);
}
示例6: SendHtmlEmail
function SendHtmlEmail($plantilla, $variables, $subject, $destino, $origen = "presupuestos@pachecoforja.com", $imagenes = NULL, $imgdir = "img", $html = NULL)
{
require_once 'mail.php';
if (!$html) {
$smarty = SmartyInit();
$smarty->assign("variables", $variables);
$body = $smarty->fetch($plantilla);
} else {
$body = $html;
}
$mail = new htmlMimeMail();
// Definimos el html
$mail->setHtml($body);
// Comprobamos si hay imagenes embebidas en el correo
if ($imagenes != NULL) {
// Leemos todos los ficheros y los aadimos al correo
foreach ($imagenes as $imagen) {
$len = strlen($imagen);
$extension = substr($imagen, $len - 3, 3);
if ($extension == "gif") {
$tipo = "image/gif";
}
if ($extension == "jpg") {
$tipo = "image/jpg";
}
$fichero = $imgdir . "/" . $imagen;
$temp = $mail->getFile($fichero);
$mail->addHtmlImage($temp, $imagen, $tipo);
}
}
// Definimos las cabeceras de los mensajes
$mail->setReturnPath($origen);
$mail->setFrom($origen);
$mail->setSubject($subject);
$mail->setHeader('X-Mailer', 'Correo enviado por pachecoforja.com');
// Enviamos el correo
$result = $mail->send(array($destino), 'smtp');
if (!$result) {
return $mail->errors;
} else {
return true;
}
}
示例7: class
* (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');
// These errors are only set if you're using SMTP to send the message
if (!$result) {
print_r($mail->errors);
} else {
echo 'Mail sent!';
}
示例8: explode
chdir($kwamoja_home);
// get me the report name from the command line
$_GET['ReportID'] = $reportnumber;
$Recipients = explode(";", $emailaddresses);
//wrap in angles so that mail can accept it
for ($i = 0; $i < count($Recipients); $i++) {
$Recipient[$i] = "<" . $Recipient[$i] . ">";
}
$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'] . "/" . $reportname, "wb");
fwrite($fp, $pdfcode);
fclose($fp);
$attachment = $mail->getFile($_SESSION['reports_dir'] . "/" . $reportname);
$mail->setText($mailtext . "\nPlease find herewith " . $reportname . " report");
$mail->setSubject($reportname . " Report");
$mail->addAttachment($attachment, $reportname, 'application/pdf');
$mail->setFrom("");
$result = $mail->send($Recipients);
} else {
$mail->setText("Error running automated sales report number {$ReportID}");
$mail->setFrom("Do_not_reply_" . $_SESSION['CompanyRecord']['coyname'] . "<" . $_SESSION['CompanyRecord']['email'] . ">");
$result = $mail->send($Recipients);
}
示例9: unset
$cTexto = $oMail->getFile("./Newsletter/Newsletter.txt");
$cTexto = str_replace("##Contenido##", $cContTexto, $cTexto);
$cTexto = str_replace("##Nombre##", $aRegistro["NwsSuscNombre"], $cTexto);
$cTexto = str_replace("##EMail##", $aRegistro["NwsSuscMail"], $cTexto);
$cTexto = str_replace("##ClaveBaja##", md5("#".$aRegistro["NwsSuscCodigo"]."#".$aRegistro["NwsSuscMail"]."#"), $cTexto);
$cHTML = $oMail->getFile("./Newsletter/Newsletter.html");
$cHTML = str_replace("##Contenido##", $cContHTML, $cHTML);
$cHTML = str_replace("##Nombre##", $aRegistro["NwsSuscNombre"], $cHTML);
$cHTML = str_replace("##EMail##", $aRegistro["NwsSuscMail"], $cHTML);
$cHTML = str_replace("##ClaveBaja##", md5("#".$aRegistro["NwsSuscCodigo"]."#".$aRegistro["NwsSuscMail"]."#"), $cHTML);
$oMail->setHtml($cHTML, $cTexto, '../');
$oMail->setFrom($cDesdeMail);
$oMail->setReturnPath($cRetorMail);
$oMail->setSubject($cAsunto);
$oMail->send(array($aRegistro["NwsSuscMail"]));
unset($oMail);
if ($_GET['Desde']=='EnvNews') {
$cSql = "INSERT INTO NwsEnvio (NwsEdicCodigo, NwsSuscCodigo) VALUES (" . $_REQUEST["Codigo"] . ", " . $aRegistro["NwsSuscCodigo"] . ")";
$nResulIns = mysql_query ($cSql) or fErrorSQL($conf["EstadoSitio"], "<br /><br /><b>Error en la consulta:</b><br />" . $cSql . "<br /><br /><b>Tipo de error:</b><br />" . mysql_error() . "<br />");
}
?>
<script language="JavaScript">
changeCaption('EstadoEnvio', '<?php
echo $cEstado;
?>
- <?php
示例10: stripslashes
//.........这里部分代码省略.........
if (trim(str_replace('X-Form-Mail-Attachment:', '', $header_info[$k])) == 'no') {
$send_attachments = false;
}
unset($header_info[$k]);
continue;
}
if (preg_match("/^" . $mail_header . "/i", $header_info[$k], $match)) {
$additional_headers[] = $header_info[$k];
$attachment_headers[str_replace(':', '', $match[0])] = trim(preg_replace("/" . $match[0] . "/i", '', $header_info[$k]));
unset($header_info[$k]);
continue;
}
}
if (isset($header_info) and is_array($header_info)) {
$new_mail_content = trim(implode($header_info, "\n"));
$new_mail_content = str_replace("\r", '', $new_mail_content);
} else {
$new_mail_content = '';
}
// if (isset($additional_headers) and is_array($additional_headers)) {
// $additional_headers = implode($additional_headers, "\n");
// } else {
// $additional_headers = '';
// }
/**
* Wrap mail content (and only mail content - not
* headers).
*/
$new_mail_content = $this->wrap_content($new_mail_content, $text_wrap);
/**
* Send mail using simple mail function
*/
if (!$send_attachments and $debug_mode != 'on' and $mail_recipient != '') {
// @mail ($mail_recipient, $mail_subject, $new_mail_content, $additional_headers);
send_mail($mail_recipient, $mail_subject, $new_mail_content, $mail_from, $attachment_headers);
}
/**
* Send mail using mail class
*/
if ($send_attachments and $debug_mode != 'on' and $mail_recipient != '') {
$att = new htmlMimeMail();
// Switch to smtp mode
if ($configuration['mail_type'] == 'smtp') {
$type = 'smtp';
$smtp = $configuration['smtp'];
$att->setSMTPParams($smtp['host'], $smtp['port'], $smtp['helo'], $smtp['auth'], $smtp['user'], $smtp['pass']);
} else {
$type = 'mail';
}
// Register file attachments in mime class
foreach ($this->attachments as $file_name) {
$att->addAttachment($att->getFile($file_name['new']), $file_name['old']);
}
//Manage mail var attachments
if (isset($configuration['attach_mail_vars']) and is_array($configuration['attach_mail_vars']) and sizeof($configuration['attach_mail_vars']) > 0) {
foreach ($configuration['attach_mail_vars'] as $attach_type) {
if ($attach_type == 'vcard') {
$attach_config = array('mailvars' => $post_data, 'type' => G10E_ATTACH_TYPE_VCARD, 'control' => $this->control_fields);
if ($res = attach_mail_variables::get_content($attach_config)) {
$att->addAttachment($res, 'vcard.vcf');
}
}
if ($attach_type == 'csv') {
$attach_config = array('mailvars' => $post_data, 'type' => G10E_ATTACH_TYPE_CSV, 'control' => $this->control_fields, 'csv_head' => true);
if ($res = attach_mail_variables::get_content($attach_config)) {
$att->addAttachment($res, 'csv.csv');
}
}
}
}
// Register headers in mime class
$html = false;
if (isset($attachment_headers) and is_array($attachment_headers)) {
foreach ($attachment_headers as $key => $val) {
$att->setHeader($key, $val);
if ($key == 'Content-Type' and preg_match('#text/html#i', $val)) {
$att->setHtmlCharset($configuration['character_set']);
$att->setHtml($new_mail_content);
$html = true;
}
}
}
$att->setHeadCharset($configuration['character_set']);
$att->setSubject($mail_subject);
if ($html != true) {
$att->setTextCharset($configuration['character_set']);
$att->setText($new_mail_content);
}
$att->send(array($mail_recipient), $type);
}
debug_mode($mail_recipient, 'Mail Recipient mail()');
debug_mode($mail_subject, 'Mail Subject mail()');
debug_mode($new_mail_content, 'Mail Content mail()');
debug_mode($additional_headers, 'Mail Additional Headers mail()');
}
}
// -re- for
$this->mail_content = $mail_content[0];
return array('status' => 'ok', 'mail_content' => $this->mail_content);
}
示例11: SendMail_HTML
function SendMail_HTML($from, $to, $subj, $body, $attach = "")
{
// sending email as html
//global $SERVER_SOFTWARE;
$mail = new htmlMimeMail();
$mail->setFrom($from);
$mail->setSubject($subj);
$mail->setHTML($body);
$mail->setHTMLCharset('windows-1251');
$mail->setHeadCharset('windows-1251');
if (is_array($attach)) {
$total = count($attach);
for ($i = 0; $i < $total; $i++) {
if (file_exists($attach[$i])) {
$attach_data = $mail->getFile($attach[$i]);
$mail->addAttachment($attach_data, basename($attach[$i]), '');
}
}
} elseif (file_exists($attach) && $attach != "") {
$attach_data = $mail->getFile($attach);
$mail->addAttachment($attach_data, basename($attach), '');
}
$result = $mail->send(array($to));
return $result;
}
示例12: template
function m_sendConfirmation()
{
$this->comFunc->obDb = $this->obDb;
$this->obDb->query = "SELECT vFirstName,vLastName,vEmail FROM " . ORDERS . " WHERE iOrderid_PK = '" . $this->request['orderid'] . "'";
$qryResult = $this->obDb->fetchQuery();
$rCount = $this->obDb->record_count;
// $uniqID=uniqid (3);
if ($rCount > 0) {
$name = $this->libFunc->m_displayContent($qryResult[0]->vFirstName) . " " . $this->libFunc->m_displayContent($qryResult[0]->vLastName);
$this->ObTpl = new template();
$this->ObTpl->set_file("TPL_MAIL_FILE", $this->mailTemplate);
$this->ObTpl->set_var("TPL_VAR_NAME", $name);
$this->ObTpl->set_var("TPL_VAR_INVOICE", $this->request['invoice']);
$this->ObTpl->set_var("TPL_VAR_METHOD", $this->request['shipper']);
$this->ObTpl->set_var("TPL_VAR_TRACKNUM", $this->request['tracking']);
$orderUrl = $this->libFunc->m_safeUrl(SITE_URL . "ecom/index.php?action=checkout.receipt&mode=" . $this->request['orderid']);
$this->ObTpl->set_var("TPL_VAR_URL", $orderUrl);
$this->ObTpl->set_var("TPL_VAR_MAILFOOTER", $this->comFunc->m_mailFooter());
$message = $this->ObTpl->parse("return", "TPL_MAIL_FILE");
$obMail = new htmlMimeMail();
$obMail->setReturnPath(ADMIN_EMAIL);
$obMail->setFrom(SITE_NAME . "<" . ADMIN_EMAIL . ">");
#11-05-07
$obMail->setSubject("Your order from " . SITE_NAME . " has shipped!");
$obMail->setCrlf("\n");
//to handle mails in Outlook Express
$htmlcontent = $message;
$txtcontent = preg_replace("/<([^>]+)>/", "", preg_replace("/<br(\\/{0,1})>/", "\r\n", $message));
$obMail->setHtml($htmlcontent, $txtcontent);
$obMail->buildMessage();
$result = $obMail->send(array($qryResult[0]->vEmail));
}
}
示例13: StripTrailingComma
$Result = DB_query("SELECT realname, email FROM www_users WHERE fullaccess=7 AND email <>''", $db);
if (DB_num_rows($Result) == 0) {
/*There are no sysadmins with email address specified */
$Recipients = array("'tim' <tim@localhost>");
} else {
/*Make an array of the sysadmin recipients */
$Recipients = array();
$i = 0;
while ($SysAdminsRow = DB_fetch_array($Result)) {
$Recipients[$i] = "'" . $SysAdminsRow['realname'] . "' <" . $SysAdminsRow['email'] . ">";
$i++;
}
}
$TryNextFile = False;
/*reset the abort to false before hit next file*/
$mail->setSubject(_('EDI Order Message Error'));
} else {
$mail->setSubject(_('EDI Order Message') . ' ' . $Order->CustRef);
$EDICustServPerson = "'tim' <tim@localhost>";
$Recipients = array($EDICustServPerson);
}
$result = $mail->send($Recipients);
echo $EmailText;
}
/* nothing in the email text to send - the message file is a complete dud - maybe directory */
/*Now create the order from the $Order object and commit to the DB*/
}
/*end of the loop around all the incoming order files in the incoming orders directory */
include 'includes/footer.inc';
function StripTrailingComma($StringToStrip)
{
示例14: prnMsg
prnMsg(_('The accepted offers from') . ' ' . $SupplierName . ' ' . _('have been converted to purcharse orders but failed to mail, you can view the order contents') . ' ' . '<a href="' . $RootPath . '/PO_Header.php?ModifyOrderNumber=' . $OrderNo . '">' . _('here') . '</a>', 'warn');
}
}
if (sizeOf($RejectsArray) > 0) {
$MailText = _('This email has been automatically generated by the webERP installation at') . ' ' . $_SESSION['CompanyRecord']['coyname'] . "\n";
$MailText .= _('The following offers you made have been rejected') . "\n\n";
foreach ($RejectsArray as $RejectID) {
$sql = "SELECT offers.quantity,\n\t\t\t\t\t\t\toffers.price,\n\t\t\t\t\t\t\tstockmaster.description\n\t\t\t\t\t\tFROM offers\n\t\t\t\t\t\tLEFT JOIN stockmaster\n\t\t\t\t\t\t\tON offers.stockid=stockmaster.stockid\n\t\t\t\t\t\tWHERE offerid='" . $RejectID . "'";
$result = DB_query($sql);
$myrow = DB_fetch_array($result);
$MailText .= $myrow['description'] . "\t" . _('Quantity') . ' ' . $myrow['quantity'] . "\t" . _('Price') . ' ' . locale_number_format($myrow['price']) . "\n";
$sql = "DELETE FROM offers WHERE offerid='" . $RejectID . "'";
$result = DB_query($sql);
}
$mail = new htmlMimeMail();
$mail->setSubject(_('Your offer to') . ' ' . $_SESSION['CompanyRecord']['coyname'] . ' ' . _('has been rejected'));
$mail->setText($MailText);
$mail->setFrom($_SESSION['CompanyRecord']['coyname'] . ' <' . $_SESSION['CompanyRecord']['email'] . '>');
$Recipients = GetMailList('OffersReceivedResultRecipients');
if (sizeOf($Recipients) == 0) {
prnMsg(_('There are no members of the Offers Received Result Recipients email group'), 'warn');
include 'includes/footer.inc';
exit;
}
array_push($Recipients, $Email);
if ($_SESSION['SmtpSetting'] == 0) {
$mail->setFrom($_SESSION['CompanyRecord']['coyname'] . ' <' . $_SESSION['CompanyRecord']['email'] . '>');
$result = $mail->send($Recipients);
} else {
$result = SendmailBySmtp($mail, $Recipients);
}
示例15: time
function m_sendPassword()
{
$this->obDb->query = "select iCustmerid_PK,vFirstName,vEmail,tmSignupDate FROM " . CUSTOMERS . " WHERE vEmail = '" . $this->request['email'] . "' AND iRegistered='1'";
$qryResult = $this->obDb->fetchQuery();
$rCount = $this->obDb->record_count;
if (isset($this->cart)) {
$action = "ecom/index.php?action=checkout.loginForm";
} else {
$action = "user/index.php?action=user.loginForm";
}
if ($rCount > 0) {
$requesttime = time();
$recoveryid = md5($qryResult[0]->iCustmerid_PK . $qryResult[0]->vFirstName . $qryResult[0]->vEmail . $qryResult[0]->tmSignupDate . $requesttime);
$this->obDb->query = "UPDATE " . CUSTOMERS . " SET vRecovery='" . $recoveryid . "',tRequestTime='" . $requesttime . "' WHERE iCustmerid_PK='" . $qryResult[0]->iCustmerid_PK . "' AND iRegistered='1'";
$this->obDb->updateQuery();
// $uniqID=uniqid (3);
$message = "Hi " . $this->libFunc->m_displayContent($qryResult[0]->vFirstName);
$message .= "<br><br>You requested to reset your login details for Username: " . $qryResult[0]->vEmail;
$message .= "<br><br>You can do so by visiting this <a href='" . SITE_URL . "user/index.php?action=user.recover&id=" . $recoveryid . "'>link</a>.";
$message .= "<br>If the link is not clickable, copy and paste this url into your browser: " . SITE_URL . "user/index.php?action=user.recover&id=" . $recoveryid;
$message .= "<br>You must click the above password within 24 hours of your request or the link will be deactivated.";
$message .= "<br><br>If you didn't request to reset your password, then please disregard this message.";
$message .= "<br><br>Best Regards,";
$message .= "<br><a href='" . SITE_URL . "'>" . SITE_NAME . "</a>";
$obMail = new htmlMimeMail();
$obMail->setReturnPath(ADMIN_EMAIL);
$obMail->setFrom(SITE_NAME . "<" . ADMIN_EMAIL . ">");
$obMail->setSubject("Login details from " . SITE_NAME);
$obMail->setCrlf("\n");
//to handle mails in Outlook Express
$htmlcontent = $message;
$txtcontent = preg_replace("/<([^>]+)>/", "", preg_replace("/<br(\\/{0,1})>/", "\r\n", $message));
$obMail->setHtml($htmlcontent, $txtcontent);
$obMail->buildMessage();
$result = $obMail->send(array($qryResult[0]->vEmail));
$retUrl = $this->libFunc->m_safeUrl(SITE_URL . $action . "&mode=sent&msg=1");
$this->libFunc->m_mosRedirect($retUrl);
exit;
} else {
$retUrl = $this->libFunc->m_safeUrl(SITE_URL . $action . "&mode=lost&msg=2");
$this->libFunc->m_mosRedirect($retUrl);
exit;
}
}