本文整理汇总了PHP中htmlMimeMail::getFile方法的典型用法代码示例。如果您正苦于以下问题:PHP htmlMimeMail::getFile方法的具体用法?PHP htmlMimeMail::getFile怎么用?PHP htmlMimeMail::getFile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类htmlMimeMail
的用法示例。
在下文中一共展示了htmlMimeMail::getFile方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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);
示例2: 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);
}
示例3: 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"];
示例4: 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);
}
示例5: htmlMimeMail
$LeftOvers = $pdf->addTextWrap($FormDesign->Total->x, $Page_Height - $FormDesign->Total->y, $FormDesign->Total->Length, $FormDesign->Total->FontSize, $DisplayTotal, 'right');
}
/* end of check to see that there was an invoice record to print */
$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');
}
示例6: 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);
}
示例7: 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;
}
}
示例8: elseif
/*to make sure dont do the detail section again */
$LastLine = 'Summary';
$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');
示例9: htmlMimeMail
// 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"]) {
check_ticket('webmail');
$a3 = $mail->getFile('temp/mail_attachs/' . $_REQUEST["attach3file"]);
$mail->addAttachment($a3, $_REQUEST["attach3"], $_REQUEST["attach3type"]);
@unlink('temp/mail_attachs/' . $_REQUEST["attach3file"]);
}
示例10: _
calculationorder,
taxontax
FROM taxgrouptaxes', $db);
while ($TaxGroupTaxesRow = DB_fetch_array($TaxGroupTaxesResult)) {
$SQLScript .= "INSERT INTO taxgrouptaxes (taxgroupid,\r\n taxauthid,\r\n calculationorder,\r\n taxontax)\r\n VALUES (" . $TaxGroupTaxesRow['taxgroupid'] . ",\r\n " . $TaxGroupTaxesRow['taxauthid'] . "\r\n " . $TaxGroupTaxesRow['calculationorder'] . "\r\n " . $TaxGroupTaxesRow['taxontax'] . ");\n";
}
$SQLScript .= 'SET FOREIGN_KEY_CHECKS=1;';
/*Now write $SQLScript to a file */
$FileHandle = fopen("./companies/" . $_SESSION['DatabaseName'] . "/reports/" . $_POST['TemplateName'] . ".sql", "w");
fwrite($FileHandle, $SQLScript);
fclose($FileHandle);
echo '<P><a href="' . $rootpath . '/companies/' . $_SESSION['DatabaseName'] . '/reports/' . $_POST['TemplateName'] . '.sql">' . _('Show the sql template file produced') . '</a>';
include 'includes/htmlMimeMail.php';
$Recipients = array('"Submissions" <submissions@weberp.org>');
$mail = new htmlMimeMail();
$attachment = $mail->getFile($rootpath . '/companies/' . $_SESSION['DatabaseName'] . '/reports/' . $_POST['TemplateName'] . '.sql');
$mail->setText('Please find company template ' . $_POST['TemplateName']);
$mail->addAttachment($attachment, 'CompanyTemplate.sql', 'application/txt');
$mail->setSubject('Company Template Submission');
$mail->setFrom($_SESSION['CompanyRecord']['coyname'] . '<' . $_SESSION['CompanyRecord']['email'] . '>');
$result = $mail->send($Recipients);
/*end of SQL Script creation */
}
/*end if Input error*/
}
/*end submit button hit */
echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">';
prnMsg(_('Running the create a new company template script will export all account groups, account codes and tax set up tables including tax groups, tax authorities, tax rates etc. However, no transactions or private data will be exported. There is opportunity to prevent specific general ledger accounts from being exported where these are considered private - again no transactional or balance data is exported and you can inspect the contents of the sql file. The template file will be emailed automatically to the webERP project'), 'info');
echo _('Enter the name of the template to be created') . ':<input type="text" name="TemplateName">';
prnMsg(_('Warning: All selected accounts will be exported - please de-select the accounts you do not wish to export to the new template file'), 'warn');
echo '<table>';
示例11: prnMsg
if (sizeOf($Recipients) == 0) {
$Title = _('Inventory Valuation') . ' - ' . _('Problem Report');
include 'includes/header.inc';
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 {
示例12: htmlMimeMail
* Last Modified..: 15 July 2002
*/
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 {
示例13: fopen
/* must be MakingPDF to email it */
/* UldisN
$pdfcode = $pdf->output();
$fp = fopen( $_SESSION['reports_dir'] . '/PurchOrder.pdf','wb');
fwrite ($fp, $pdfcode);
fclose ($fp);
*/
$PdfFileName = $_SESSION['DatabaseName'] . '_PurchaseOrder_' . date('Y-m-d') . '.pdf';
$ReportsDirName = $_SESSION['reports_dir'];
$pdf->Output($ReportsDirName . '/' . $PdfFileName, 'F');
//UldisN
$pdf->__destruct();
//UldisN
include 'includes/htmlMimeMail.php';
$mail = new htmlMimeMail();
$attachment = $mail->getFile($ReportsDirName . '/' . $PdfFileName);
$mail->setText(_('Please find herewith our purchase order number') . ' ' . $OrderNo);
$mail->setSubject(_('Purchase Order Number') . ' ' . $OrderNo);
$mail->addAttachment($attachment, $PdfFileName, 'application/pdf');
$mail->setFrom($_SESSION['CompanyRecord']['coyname'] . "<" . $_SESSION['CompanyRecord']['email'] . ">");
$result = $mail->send(array($_POST['EmailTo']));
if ($result == 1) {
$failed = false;
echo '<br />';
prnMsg(_('Purchase Order') . ' ' . $OrderNo . ' ' . _('has been emailed to') . ' ' . $_POST['EmailTo'] . ' ' . _('as directed'), 'success');
} else {
$failed = true;
echo '<br />';
prnMsg(_('Emailing Purchase order') . ' ' . $OrderNo . ' ' . _('to') . ' ' . $_POST['EmailTo'] . ' ' . _('failed'), 'error');
}
}
示例14: strlen
$result = DB_query($sql, $db, $ErrMsg);
$myrow = DB_fetch_row($result);
$YPos -= $line_height;
$LeftOvers = $pdf->addTextWrap($Left_Margin, $YPos, 200, $FontSize, _('Total number of order lines') . ' ' . number_format($myrow[0]), 'left');
$YPos -= $line_height;
$LeftOvers = $pdf->addTextWrap($Left_Margin, $YPos, 200, $FontSize, _('DIFOT') . ' ' . number_format((1 - $TotalDiffs / $myrow[0]) * 100, 2) . '%', 'left');
$pdfcode = $pdf->output();
$len = strlen($pdfcode);
header('Content-type: application/pdf');
header('Content-Length: ' . $len);
header('Content-Disposition: inline; filename=DIFOT.pdf');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
$pdf->stream();
if ($_POST['Email'] == 'Yes') {
if (file_exists($_SESSION['reports_dir'] . '/DIFOT.pdf')) {
unlink($_SESSION['reports_dir'] . '/DIFOT.pdf');
}
$fp = fopen($_SESSION['reports_dir'] . '/DIFOT.pdf', 'wb');
fwrite($fp, $pdfcode);
fclose($fp);
include 'includes/htmlMimeMail.php';
$mail = new htmlMimeMail();
$attachment = $mail->getFile($_SESSION['reports_dir'] . '/DIFOT.pdf');
$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'] . '>');
/* $DelDiffsRecipients defined in config.php */
$result = $mail->send($DelDiffsRecipients);
}
示例15: 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;
}