Beispiel #1
0
 /**
  *发送邮件
  *
  *@param   string  发送邮箱地址
  *@param   array   接收邮箱地址
  *@param   array   抄送人
  *@param   string  邮件标题
  *@param   string  邮件内容
  *@param   array   文件附件,地址格式
  *@param   string  编码格式
  */
 public function send($from, $to, $cc = '', $subject, $content = '', $files = '', $char = 'utf-8')
 {
     $site_email = new htmlMimeMail5();
     $site_email->setHeadCharset($char);
     $site_email->setTextCharset($char);
     $site_email->setHtmlCharset($char);
     $site_email->setFrom($from);
     $site_email->setSubject($subject);
     $site_email->setHTML($content);
     $site_email->setCc($cc);
     $address = explode(",", $to);
     if ($files != '') {
         foreach ($files as $file) {
             if (file_exists($file)) {
                 $attachment = new fileAttachment($file);
                 $site_email->addAttachment($attachment);
             } else {
                 $this->logger->write_log('ERROR', 'MAIL: attachment ' . $file . ' not exists');
             }
         }
     }
     foreach ($address as $k) {
         $mail[$k] = 1;
     }
     foreach ($mail as $k => $v) {
         $address_new[] = $k;
     }
     if ($site_email->send($address_new)) {
         return true;
     } else {
         return false;
     }
 }
Beispiel #2
0
 function send_report_mail($recipient)
 {
     global $PATH, $MAIL_CFG, $LNK;
     $fullfilename = $this->fname;
     $msg = "Ein Backup vom Server zum Backup-Server wurde erstellt. Dabei wurde folgendes Protokoll erstellt:\n\n";
     $msg .= $fullfilename . "\n\n";
     $msg .= "Es gab folgende FEHLER (nur solche, die automatisch erfasst werden konnten):\n\n";
     $sql = "select * from reports where klasse like 'ERROR' order by uid asc;";
     $result = mysqli_query($LNK, $sql);
     $txt = "";
     while ($row = mysqli_fetch_assoc($result)) {
         $txt .= $row["datum"] . "\t";
         $txt .= $row["meldung"] . "\n";
     }
     $msg .= $txt;
     if ($txt == "") {
         $msg .= "< KEINE. >";
     }
     $msg .= "\n\n\nEs gab folgende WARNUNGEN:\n\n";
     $sql = "select * from reports where klasse like 'WARNING' order by uid asc;";
     $result = mysqli_query($LNK, $sql);
     $txt = "";
     while ($row = mysqli_fetch_assoc($result)) {
         $txt .= $row["datum"] . "\t";
         $txt .= $row["meldung"] . "\n";
     }
     $msg .= $txt;
     if ($txt == "") {
         $msg .= "< KEINE. >";
     }
     $mail = new htmlMimeMail5();
     $mail->setFrom($MAIL_CFG["from"]);
     $mail->setSubject('Backup-Durchlauf ' . strftime('%d.%m.%y %H:%M:%S', time()));
     $mail->setHeader('Date', date('D, d M y H:i:s O'));
     $mail->setTextCharset('UTF-8');
     $mail->setText($msg);
     $mail->setHtmlCharset('UTF-8');
     $mail->setHTML(file_get_contents($this->fname));
     // $mail->addEmbeddedImage(new fileEmbeddedImage($PATH."img/APPrototype.gif"));
     // $mail->addAttachment(new fileAttachment('example.zip'));
     $mail->setSMTPParams($MAIL_CFG["host"], $MAIL_CFG["port"], $MAIL_CFG["helo"], $MAIL_CFG["auth"], $MAIL_CFG["user"], $MAIL_CFG["pass"]);
     $mail->send(array($recipient), 'smtp');
     // first param is an array!
     if (isset($mail->errors)) {
         echo "\n\n\nFehler beim Versand der Report-Mail an {$recipient} !\n\n\n";
         if (is_array($mail->errors)) {
             echo implode("; ", $mail->errors) . "\n";
             // non-fatal;
         } else {
             errlog($mail->errors) . "\n";
             // non-fatal;
         }
     }
 }
Beispiel #3
0
function send_mail_client($email)
{
    $text = '<p>Спасибо за регистрацию!</p>';
    $text .= '<p>Ждем Вас  24 и 25 марта 2015 года в НСК «Олимпийский»,"Зал Чемпионов".</p>';
    $mailSend = new htmlMimeMail5();
    $helo = "Aviaforum Kiev";
    $mailSend->setFrom('Aviaforum Kiev <' . MAILUSER . '>');
    $mailSend->setTextCharset('utf-8');
    $mailSend->setHtmlCharset('utf-8');
    $mailSend->setHeadCharset('utf-8');
    $mailSend->setSubject('Авиафорум');
    $mailSend->setHTML($text);
    $mailSend->send(array($email), mail);
}
Beispiel #4
0
 public function sendEmail($subject, $body, $recipientID, $parameters)
 {
     $emailData = $this->getEMailData($parameters);
     $parameters = explode("::", $parameters);
     $action = $parameters[0];
     $className = $parameters[1];
     $classID = $parameters[2];
     $time = $parameters[3];
     $C = new $className($classID);
     $data = $C->getCalendarDetails($className, $classID);
     $adresse = $data->getAdresse();
     $fromName = Session::currentUser()->A("name");
     $from = Session::currentUser()->A("UserEmail");
     $mail = new htmlMimeMail5();
     $mail->setFrom(utf8_decode($fromName . " <" . $from . ">"));
     if (!ini_get('safe_mode')) {
         $mail->setReturnPath($from);
     }
     $mail->setSubject(utf8_decode($subject));
     /*if($action == "reply"){
     			$ics = "BEGIN:VCALENDAR
     PRODID:-//lightCRM Kalender
     VERSION:2.0
     METHOD:REPLY
     BEGIN:VEVENT
     CREATED:20121130T004454Z
     LAST-MODIFIED:20121201T143509Z
     DTSTAMP:20121201T143509Z
     UID:7715ie5i20hvm0b71p18vhgj70@google.com
     SUMMARY:Test
     STATUS:CONFIRMED
     ORGANIZER;CN=rainer.furtmeier@googlemail.com:mailto:rainer.furtmeier@googl
      email.com
     ATTENDEE;CN=nemi@2sins.de;PARTSTAT=ACCEPTED;CUTYPE=INDIVIDUAL;ROLE=REQ-PAR
      TICIPANT;X-NUM-GUESTS=0:mailto:nemi@2sins.de
     DTSTART:20121206T123000Z
     DTEND:20121206T133000Z
     DESCRIPTION:
     SEQUENCE:5
     TRANSP:OPAQUE
     END:VEVENT
     END:VCALENDAR";
     		}*/
     if ($action == "notification") {
         $ics = "BEGIN:VCALENDAR\nPRODID:-//lightCRM Kalender\nVERSION:2.0\nMETHOD:REQUEST\nBEGIN:VTIMEZONE\nTZID:Europe/Berlin\nX-LIC-LOCATION:Europe/Berlin\nBEGIN:DAYLIGHT\nTZOFFSETFROM:+0100\nTZOFFSETTO:+0200\nTZNAME:CEST\nDTSTART:19700329T020000\nRRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3\nEND:DAYLIGHT\nBEGIN:STANDARD\nTZOFFSETFROM:+0200\nTZOFFSETTO:+0100\nTZNAME:CET\nDTSTART:19701025T030000\nRRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10\nEND:STANDARD\nEND:VTIMEZONE\nBEGIN:VEVENT\nLAST-MODIFIED:20120629T094018Z\nDTSTAMP:" . date("Ymd") . "T" . date("His") . "\nUID:" . $data->UID() . "\nSUMMARY:" . $data->summary() . "\nORGANIZER;CN=\"{$fromName}\":MAILTO:{$from}\nDTSTART;TZID=Europe/Berlin:" . date("Ymd", Kalender::parseDay($data->getDay())) . "T" . $data->getTime() . "00\nDTEND;TZID=Europe/Berlin:" . date("Ymd", Kalender::parseDay($data->getEndDay())) . "T" . $data->getEndTime() . "00\nEND:VEVENT\nEND:VCALENDAR";
     }
     $mail->addAttachment(new stringAttachment($ics, "event.ics", 'application/ics'));
     $adresse->replaceByAnsprechpartner($recipientID);
     $body = str_replace("{Anrede}", Util::formatAnrede($_SESSION["S"]->getUserLanguage(), $adresse), $body);
     if ($action == "notification") {
         $mail->setCalendar($ics, "REQUEST");
     }
     #if($action == "reply")
     #	$mail->setCalendar($ics, "REPLY");
     $mail->setTextCharset("UTF-8");
     $mail->setCalendarCharset("UTF-8");
     $mail->setText($body);
     #print_r($mail->getRFC822(array("*****@*****.**")));
     #die();
     $mail->send(array($emailData["recipients"][$recipientID][1]));
     $C->setNotified($className, $classID);
 }
Beispiel #5
0
<?php

require_once 'htmlMimeMail5.php';
$mail = new htmlMimeMail5();
/**
 * Set the from address of the email
 */
$mail->setFrom('Envisage Media Pvt. Ltd. <*****@*****.**>');
/**
 * Set the subject of the email
 */
$sub = "Cafe Report Date:'" . date('d-m-Y H:i') . "'";
$mail->setSubject($sub);
/**
 * Set high priority for the email. This can also be:
 * high/normal/low/1/3/5
 */
$mail->setPriority('high');
/**
 * Set the text of the Email
 */
// $mail->setText('Sample text');
/**
 * Set the HTML of the email. Any embedded images will be automatically found as long as you have added them
 * using addEmbeddedImage() as below.
 */
$date = date("Y-m-d", mktime(0, 0, 0, date("m"), date("d") - 1, date("Y")));
$htmlMailTemplate = '<p><b>Dear Recipient</b>,</p>
        
        <br>
          <a href="http://www.emmgts.com/export/export_cafehits.php?w=1&amp;date=' . $date . '">Download Report</a>
Beispiel #6
0
 public function sendMsgNow($message)
 {
     $mType = $message->mType;
     $recp = westorElggMan_get_entity($message->toId);
     $sender = westorElggMan_get_entity($message->fromId);
     $senderEmail = $this->getEntityProperty($sender, elgg_echo('ElggMan_:cEmail'));
     $subject = $message->title;
     $body = $message->description;
     if ($message->mType == "EMAIL" || $message->mType == "EMAILTXT") {
         $mail = new htmlMimeMail5();
     }
     switch ($message->mType) {
         case "EMAIL":
             $mail->setHTMLCharset("UTF-8");
             $mail->setHTML($body);
         case "EMAILTXT":
             $mail->setTextCharset("UTF-8");
             $mail->setHeadCharset("UTF-8");
             $mail->setFrom($senderEmail);
             $mail->setSubject($subject);
             $search = array("|<br[[:space:]]*/?[[:space:]]*>|i", "|</p>|i");
             $replace = array("\r\n", "\r\n");
             $mail->setText(strip_tags(html_entity_decode(preg_replace($search, $replace, $body))));
             if ($recp->getSubtype() == "PrivateContact") {
                 $mail->send(array($recp->user_email));
             } else {
                 $mail->send(array($recp->email));
             }
             $message->waitForSend = 0;
             // mark as done
             $message->state = 'OK';
             break;
         case "HQ-SMS":
             $senderNumber = $sender->westorElggManSMSSender;
             $recipientNumber = $this->getEntityProperty($recp, elgg_echo('ElggMan_:cMobile'));
             $result = $this->sendSMSToGateway($senderNumber, $recipientNumber, $body, $message->mType);
             if ($result["success"]) {
                 $message->waitForSend = 0;
                 // mark as done
                 $message->state = 'OK';
             } else {
                 if ($message->retryed >= 3) {
                     $message->waitForSend = 0;
                     // mark as done
                     $message->state = 'FAILED';
                 }
                 $message->retryed++;
             }
             break;
         default:
     }
     // switch
     $message->save();
     return $result;
 }
Beispiel #7
0
 public function lostPassword($username)
 {
     // <editor-fold defaultstate="collapsed" desc="Aspect:jP">
     try {
         $MArgs = func_get_args();
         return Aspect::joinPoint("around", $this, __METHOD__, $MArgs);
     } catch (AOPNoAdviceException $e) {
     }
     Aspect::joinPoint("before", $this, __METHOD__, $MArgs);
     // </editor-fold>
     if ($username == "") {
         Red::errorC("User", "lostPasswordErrorUser");
     }
     $Lang = $this->loadLanguageClass("User")->getText();
     $ac = new anyC();
     $ac->setCollectionOf("User");
     $ac->addAssocV3("username", "=", $username);
     $ac->lCV3();
     $U = $ac->getNextEntry();
     if ($U == null) {
         try {
             $AL = new mphynxAltLogin();
             $AL->addAssocV3("username", "=", $username);
             $U = $AL->getNextEntry();
         } catch (Exception $e) {
             Red::errorC("User", "lostPasswordErrorUser");
         }
     }
     if ($U == null) {
         Red::errorC("User", "lostPasswordErrorUser");
     }
     $Admin = new anyC();
     $Admin->setCollectionOf("User");
     $Admin->addAssocV3("isAdmin", "=", "1");
     $Admin = $Admin->getNextEntry();
     if ($Admin == null) {
         Red::errorC("User", "lostPasswordErrorAdmin");
     }
     if ($Admin->A("UserEmail") == "") {
         Red::errorC("User", "lostPasswordErrorAdmin");
     }
     $mail = new htmlMimeMail5();
     $mail->setFrom("phynx@" . $_SERVER["HTTP_HOST"]);
     $mail->setSubject("[phynx] Password recovery for user {$username}");
     $mail->setText(wordwrap("Dear " . $Admin->A("name") . ",\n\nyou received this email because the user '{$username}' of the phynx framework at {$_SERVER['HTTP_HOST']} has lost his password and is requesting a new one.\n\nBest regards\n\tphynx", 80));
     if (!$mail->send(array($Admin->A("UserEmail")))) {
         Red::errorC("User", "lostPasswordErrorAdmin");
     }
     Red::alertC("User", "lostPasswordOK");
 }
Beispiel #8
0
//creating objects
$cafe_details = new CafeDetails();
/**
 * o------------------------------------------------------------------------------o
 * | This package is licensed under the Phpguru license. A quick summary is       |
 * | that for commercial use, there is a small one-time licensing fee to pay. For |
 * | registered charities and educational institutes there is a reduced license   |
 * | fee available. You can read more  at:                                        |
 * |                                                                              |
 * |                  http://www.phpguru.org/static/license.html                  |
 * o------------------------------------------------------------------------------o
 *
 * © Copyright 2008,2009 Richard Heyes
 */
require_once 'htmlMimeMail5.php';
$mail = new htmlMimeMail5();
/**
 * Set the from address of the email
 */
$mail->setFrom('Envisage Media Pvt. Ltd. <*****@*****.**>');
/**
 * Set the subject of the email
 */
$mail->setSubject('Payment Information, Envisage Media (Desktop Advertising) ');
/**
 * Set high priority for the email. This can also be:
 * high/normal/low/1/3/5
 */
$mail->setPriority('high');
/**
 * Set the text of the Email
Beispiel #9
0
 /**
  * @param string $iCal
  * @param string $myEmail
  * @param int $answer possible values: accept: 1, maybe: 2, decline: 3
  */
 public static function answerInvitation(string $iCal, string $myEmail, int $answer)
 {
     if ($answer == "1") {
         $text = "akzeptiert";
     }
     if ($answer == "2") {
         $text = "vorläufig akzeptiert";
     }
     if ($answer == "3") {
         $text = "abgelehnt";
     }
     $VC = new vcalendar();
     $VC->parse($iCal);
     $event = $VC->getComponent("vevent");
     $targetAttendee = "MAILTO:" . $myEmail;
     $i = 1;
     while ($valueOccur = $event->getProperty("ATTENDEE", $i, true)) {
         if (stripos($valueOccur["value"], $targetAttendee) === false) {
             $i++;
             continue;
         }
         $params = $valueOccur["params"];
         if ($answer == "1") {
             $params["PARTSTAT"] = "ACCEPTED";
         }
         if ($answer == "2") {
             $params["PARTSTAT"] = "TENTATIVE";
         }
         if ($answer == "3") {
             $params["PARTSTAT"] = "DECLINED";
         }
         if (isset($params["RSVP"])) {
             unset($params["RSVP"]);
         }
         $event->setAttendee($targetAttendee, $params, $i);
         $i++;
     }
     $i = 1;
     while ($valueOccur = $event->getProperty("ATTENDEE", $i, true)) {
         if (stripos($valueOccur["value"], $targetAttendee) === false) {
             $i++;
             $event->deleteProperty("ATTENDEE");
             continue;
         }
         $i++;
     }
     $event->setProperty("DTSTAMP", gmdate("Ymd") . "T" . gmdate("His") . "Z");
     $event->setProperty("LAST-MODIFIED", gmdate("Ymd") . "T" . gmdate("His") . "Z");
     $VC->deleteComponent("vevent");
     $VC->setComponent($event);
     $VC->setMethod("REPLY");
     $ics = $VC->createCalendar();
     $fromName = Session::currentUser()->A("name");
     $from = Session::currentUser()->A("UserEmail");
     $mail = new htmlMimeMail5();
     $mail->setFrom(utf8_decode($fromName . " <" . $from . ">"));
     if (!ini_get('safe_mode')) {
         $mail->setReturnPath($from);
     }
     $mail->setSubject(utf8_decode("Antwort Termineinladung (" . ucfirst($text) . "): " . $event->getProperty("SUMMARY")));
     $mail->addAttachment(new stringAttachment($ics, "invite.ics", 'application/ics'));
     $mail->setCalendar($ics, "REPLY");
     $mail->setCalendarCharset("UTF-8");
     $mail->setTextCharset("UTF-8");
     $mail->setText("{$fromName} hat diesen Termin {$text}");
     $organizer = str_replace("MAILTO:", "", $event->getProperty("ORGANIZER"));
     return $mail->send(array($organizer));
 }
Beispiel #10
0
    $stat = stat($tempDir . "/" . $file);
    $user = array("name" => "windows");
    if (function_exists('posix_getpwuid')) {
        $user = posix_getpwuid($stat[4]);
    }
    $group = array("name" => "windows");
    if (function_exists('posix_getgrgid')) {
        $group = posix_getgrgid($stat[5]);
    }
    $tempDirSubdirs[] = "\t" . str_pad($file . ":", 32) . str_pad("<span style=\"color:" . (($stat[4] == $infoStat[4] and $stat[5] == $infoStat[5] or !ini_get("safe_mode")) ? "green;" : "red;  ") . "\">" . $user["name"] . "({$stat['4']}):" . $group["name"] . "({$stat['5']})</span>", 70) . generic(is_writable($tempDir . "/" . $file), "beschreibbar");
}
closedir($fp);
echo "\n";
if (isset($_GET["mailto"])) {
    require "../libraries/mailer/htmlMimeMail5.class.php";
    $mail = new htmlMimeMail5();
    $mail->setFrom("phynx Mailtest <" . $_GET["mailfrom"] . ">");
    if (!ini_get('safe_mode')) {
        $mail->setReturnPath($_GET["mailfrom"]);
    }
    $mail->setSubject("phynx Mailtest");
    $mail->setText(wordwrap("Diese Nachricht wurde vom phynx Mailtester erzeugt. Ihre E-Mail-Einstellungen sind korrekt.", 80));
    $adressen = array();
    $adressen[] = $_GET["mailto"];
    if ($_GET["mailfrom"] != "") {
        if ($mail->send($adressen)) {
            echo "<span style=\"color:green;\">E-Mail erfolgreich übergeben.</span>\n\n";
        } else {
            echo "<span style=\"color:red;\">Fehler beim Übergeben der E-Mail. Bitte überprüfen Sie Ihre Server-Einstellungen.\nFehler: " . print_r($mail->errors, true) . "</span>\n\n";
        }
    } else {
 public function testMail($mailfrom, $mailto)
 {
     #parse_str($data, $out);
     #print_r($out);
     if ($mailfrom == "") {
         Red::errorD("Bitte geben Sie einen Absender ein!");
     }
     if ($mailto == "") {
         Red::errorD("Bitte geben Sie einen Empfänger ein!");
     }
     $mail = new htmlMimeMail5();
     $mail->setFrom("phynx Mailtest <" . $mailfrom . ">");
     if (!ini_get('safe_mode')) {
         $mail->setReturnPath($mailfrom);
     }
     $mail->setSubject("phynx Mailtest");
     $mail->setText(wordwrap("Diese Nachricht wurde vom phynx Mailtester erzeugt. Ihre E-Mail-Einstellungen sind korrekt.", 80));
     $adressen = array();
     $adressen[] = $mailto;
     if ($mail->send($adressen)) {
         echo "<p style=\"padding:5px;color:green;\">E-Mail erfolgreich übergeben.</p>";
     } else {
         echo "<p style=\"padding:5px;color:red;\">Fehler beim Übergeben der E-Mail. Bitte überprüfen Sie Ihre Server-Einstellungen.<br />Fehler: " . nl2br(print_r($mail->errors, true)) . "</p>";
     }
 }
 /**
  * Envoie de mail sur l'evolution des données de la transactions depuis Arcadia
  * @param string $paramSujet
  * @param string $paramCorpMail
  * @param string $paramArdTto
  * @param string $paramArdFrom
  * @param string $paramUrlSmtp
  * @return string
  */
 function sendMail($paramSujet, $paramCorpMail, $paramArdTto, $paramArdFrom, $paramUrlSmtp)
 {
     //Création du mail
     $mail = new htmlMimeMail5();
     //
     $mail->setSMTPParams($paramUrlSmtp);
     // Set the From and Reply-To headers
     $mail->setFrom($paramArdFrom);
     $mail->setReturnPath($paramArdFrom);
     // Set the Subject
     $mail->setSubject($paramSujet);
     /**
      * Encodement en utf-8
      */
     $mail->setTextCharset("UTF-8");
     $mail->setHTMLCharset("UTF-8");
     $mail->setHeadCharset("UTF-8");
     // Set the body
     $mail->setHTML(nl2br($paramCorpMail));
     /**
      * L'envoi réel du mail n'est pas réalisé en environnement Codeur
      */
     $result = $mail->send(array($paramArdTto), 'smtp');
     return $result;
 }
Beispiel #13
0
<?php

/**
 * o------------------------------------------------------------------------------o
 * | This package is licensed under the Phpguru license. A quick summary is       |
 * | that for commercial use, there is a small one-time licensing fee to pay. For |
 * | registered charities and educational institutes there is a reduced license   |
 * | fee available. You can read more  at:                                        |
 * |                                                                              |
 * |                  http://www.phpguru.org/static/license.html                  |
 * o------------------------------------------------------------------------------o
 *
 * � Copyright 2008,2009 Richard Heyes
 */
require_once 'mail/htmlMimeMail5.php';
$mail = new htmlMimeMail5();
/**
 * Set the from address of the email
 */
$mail->setFrom('Envisage Media Pvt. Ltd. <*****@*****.**>');
/**
 * Set the subject of the email
 */
$mail->setSubject('Daily report of no of screen installed');
/**
 * Set high priority for the email. This can also be:
 * high/normal/low/1/3/5
 */
$mail->setPriority('high');
/**
 * Set the text of the Email
 public function sendMail($strSubject, $strHtmlBody, $strSender, $arrRecipients)
 {
     $strReturn = "";
     //*** Build the e-mail.
     $strTextBody = str_replace("<br /> ", "<br />", $strHtmlBody);
     $strTextBody = str_replace("<br />", "\n", $strTextBody);
     $strTextBody = str_replace("&nbsp;", "", $strTextBody);
     $strTextBody = strip_tags($strTextBody);
     $strTextBody = html_entity_decode($strTextBody, ENT_COMPAT, "UTF-8");
     //*** Send the email.
     $objMail = new htmlMimeMail5();
     $objMail->setHTMLEncoding(new Base64Encoding());
     $objMail->setTextCharset("utf-8");
     $objMail->setHTMLCharset("utf-8");
     $objMail->setHeadCharset("utf-8");
     $objMail->setFrom($strSender);
     $objMail->setSubject($strSubject);
     $objMail->setText($strTextBody);
     $objMail->setHTML($strHtmlBody);
     if (!$objMail->send($arrRecipients)) {
         $strReturn = $objMail->errors;
     }
     return $strReturn;
 }
function envoismail($sujetmail, $text, $destinataire, $expediteur, $paramTypeMail = null, $conf = null)
{
    if ($conf == null) {
        $globalConfig = new GlobalConfig();
    }
    if ($globalConfig->getConf()->getSmtpServiceEnable() == TRUE) {
        /*
         * Toutes les adresses emails sont redirigées vers utilisateurs.fta@ldc.fr
         * Si la redirection est mis en place
         */
        if ($globalConfig->getConf()->getSmtpEmailRedirectionUser()) {
            $destinataire_orig = $destinataire;
            $destinataire = $globalConfig->getConf()->getSmtpEmailRedirectionUser();
            $sujetmail_orig = $sujetmail;
            $sujetmail = "[Environnement " . $globalConfig->getConf()->getExecEnvironment() . "] " . $sujetmail_orig;
            $text_orig = $text;
            if (is_array($destinataire_orig)) {
                $listeDesDestinataire = explode(",", $destinataire_orig);
            } else {
                $listeDesDestinataire = $destinataire_orig;
            }
            $text = $listeDesDestinataire . "\n" . $text_orig;
        }
        //Création du mail
        $mail = new htmlMimeMail5();
        $mail->setSMTPParams($globalConfig->getConf()->getSmtpServerName());
        // Set the From and Reply-To headers
        $mail->setFrom($expediteur);
        $mail->setReturnPath($expediteur);
        // Set the Subject
        $mail->setSubject($sujetmail);
        /**
         * Encodement en utf-8
         */
        $mail->setTextCharset("UTF-8");
        $mail->setHTMLCharset("UTF-8");
        $mail->setHeadCharset("UTF-8");
        // Set the body
        $mail->setHTML(nl2br($text));
        //$result = $mail->send(array($adresse_to), 'smtp');
        //$result = $mail->send(array($destinataire), 'smtp');
        /**
         * L'envoi réel du mail n'est pas réalisé en environnement Codeur
         */
        if ($paramTypeMail != "mail-transactions") {
            $result = $mail->send(array($destinataire), 'smtp');
        }
        if (!$result and $globalConfig->getConf()->getExecEnvironment() == EnvironmentConf::ENV_PRD) {
            $paramTypeMail = "Erreur";
        }
    }
    /**
     * Génération de log
     */
    $paramLog = $paramTypeMail . " " . $expediteur . " " . $destinataire . "\n" . $sujetmail . "\n" . $text;
    //    Logger::AddMail($paramLog, $paramTypeMail);
}
Beispiel #16
0
<?php

/**
 * o------------------------------------------------------------------------------o
 * | This package is licensed under the Phpguru license. A quick summary is       |
 * | that for commercial use, there is a small one-time licensing fee to pay. For |
 * | registered charities and educational institutes there is a reduced license   |
 * | fee available. You can read more  at:                                        |
 * |                                                                              |
 * |                  http://www.phpguru.org/static/license.html                  |
 * o------------------------------------------------------------------------------o
 *
 * © Copyright 2008,2009 Richard Heyes
 */
require_once 'htmlMimeMail5.php';
$mail = new htmlMimeMail5();
/**
 * Set the from address of the email
 */
$mail->setFrom('Envisage Media Pvt. Ltd. <*****@*****.**>');
/**
 * Set the subject of the email
 */
$mail->setSubject('Cyber Cafe Screen Activation Confirmation');
/**
 * Set high priority for the email. This can also be:
 * high/normal/low/1/3/5
 */
$mail->setPriority('high');
/**
 * Set the text of the Email
Beispiel #17
0
 public static function remindPassword($strUser)
 {
     global $objLiveAdmin, $objLang, $_CONF;
     $blnReturn = false;
     $filters = array('container' => 'auth', 'filters' => array('handle' => $strUser, 'account_id' => array($_CONF['app']['account']->getId())));
     $arrUsers = $objLiveAdmin->getUsers($filters);
     if (is_array($arrUsers)) {
         foreach ($arrUsers as $objUser) {
             //*** A valid user account has been found.
             //*** Generate a new password.
             $strPass = self::makePasswd(8);
             //*** Update user account.
             $data = array('passwd' => $strPass);
             $objLiveAdmin->updateUser($data, $objUser['perm_user_id']);
             //*** Mail the new password to the user.
             $objMail = new htmlMimeMail5();
             $objMail->setFrom($_CONF['comm']['mailFrom']);
             $objMail->setSubject($objLang->get("subjectReminder", "login"));
             $objMail->setText(sprintf($objLang->get("textReminder", "login"), $objUser['name'], $strPass, Request::getRootUri()));
             $objMail->send(array($objUser['email']));
             $blnReturn = true;
         }
     }
     return $blnReturn;
 }
<?php

// Instantiate the class
$mail = new htmlMimeMail5();
// Set the From and Reply-To headers
$mail->setFrom('Jason <*****@*****.**>');
$mail->setReturnPath('*****@*****.**');
// Set the Subject
$mail->setSubject('Test with attached email');
// Set the body
$mail->setText("Please find attached Chapter 16. Thank you!");
// Retrieve a file for attachment
$attachment = $mail->getFile('chapter16.doc');
// Attach the file, assigning it a name and a corresponding Mime-type.
$mail->addAttachment($attachment, 'chapter16.doc', 'application/vnd.ms-word');
// Send the email to editor@example.com
$result = $mail->send(array('*****@*****.**'));
Beispiel #19
0
 * |                                                                              |
 * |                  http://www.phpguru.org/static/license.html                  |
 * o------------------------------------------------------------------------------o
 *
 * © Copyright 2008,2009 Richard Heyes
 */
/**
 * This example shows you how to create an email with another email attached
 */
require_once 'htmlMimeMail5.php';
/**
 * Create the attached email
 */
$attachment = new htmlMimeMail5();
$attachment->setFrom('Bob <*****@*****.**>');
$attachment->setText('This email is attached.');
$attachment->setSubject('This email is attached.');
$body = $attachment->getRFC822(array('*****@*****.**'));
/**
 * Now create the email it will be attached to
 */
$mail = new htmlMimeMail5();
$mail->addAttachment(new StringAttachment($body, 'Attached message', 'message/rfc822', new SevenBitEncoding()));
$mail->addAttachment(new FileAttachment('example.zip'));
$mail->setFrom('Richard <*****@*****.**>');
$mail->setSubject('Test email');
$mail->setText('Sample text');
$result = $mail->send(array('*****@*****.**'));
?>

Message has been sent
Beispiel #20
0
	function enviarMail($para = "",$asunto = "",$mensaje = "",$adj = "") {
		if (!is_array($para)) {
			$para = array($para);
		}
		if (!is_array($adj)) {
			$adj = array($adj);
		}
		$hmm = new htmlMimeMail5();
		//$hmm->setSMTPParams('smtp.msa.orange-business.com',587,'audial.fr',true,'audialsite','audial2133');
		$hmm->setCrlf("\n");
		$hmm->setSubject($asunto);
		$hmm->setText($mensaje);
		$hmm->setFrom("Cityzen Mobility <*****@*****.**>");
		//$hmm->setFrom("UMPB ");
		$hmm->setReturnPath("*****@*****.**");
		//$hmm->setHeader("return-path", "*****@*****.**");
		
		//echo "ici : " . count($adj) . "<br>";
		foreach ($adj as $n => $v) {
			if ($v != "") {
				//echo "ajout de " . $v . "<br>";
				$hmm->addAttachment(new fileAttachment($v));
			}
		}
		
		$result = $hmm->send($para,'mail');
		//echo "----- " . date("H:i:s") . " : " . $result . "<br>";
		if (!$result) {
			print_r($hmm->errors);
			die();
		}
	}
 function handleForm($valuesAssocArray)
 {
     $this->classes();
     switch ($valuesAssocArray["action"]) {
         case "register":
             $F = new Factory("Adresse");
             $F->sA("firma", $valuesAssocArray["firma"]);
             $F->sA("strasse", $valuesAssocArray["strasse"]);
             $F->sA("nr", $valuesAssocArray["nr"]);
             $F->sA("plz", $valuesAssocArray["plz"]);
             $F->sA("ort", $valuesAssocArray["ort"]);
             $F->sA("email", $valuesAssocArray["userEmail"]);
             //from email
             $F->sA("tel", $valuesAssocArray["tel"]);
             $AdresseID = $F->store(false, false);
             $K = new Kunden();
             $Kappendix = $K->createKundeToAdresse($AdresseID, false, true);
             $Kappendix->changeA("KappendixKontonummer", $valuesAssocArray["kontonummer"]);
             $Kappendix->changeA("KappendixBLZ", $valuesAssocArray["blz"]);
             $Kappendix->changeA("KappendixSameKontoinhaber", "1");
             $KappendixID = $Kappendix->newMe(false);
             $token = sha1($AdresseID . $KappendixID . microtime());
             $F = new Factory("PDFixUser");
             $F->sA("PDFixUserAdresseID", $AdresseID);
             $F->sA("PDFixUserKappendixID", $KappendixID);
             $F->sA("PDFixUserPDFixUserDBID", "0");
             $F->sA("PDFixUserIsActive", "0");
             $F->sA("PDFixUserVorNachname", $valuesAssocArray["userVorNachname"]);
             $F->sA("PDFixUserUsername", $valuesAssocArray["userUsername"]);
             $F->sA("PDFixUserPassword", $valuesAssocArray["userPassword"]);
             $F->sA("PDFixUserEmail", $valuesAssocArray["userEmail"]);
             $F->sA("PDFixUserRate", $valuesAssocArray["zahlungsweise"]);
             $F->sA("PDFixUserRegisteredDate", time());
             $F->sA("PDFixUserToken", $token);
             $F->store(false, false);
             $mail = new htmlMimeMail5();
             $mail->setFrom("*****@*****.**");
             $mail->setSubject(utf8_decode("PDFix Registrierung ihres Mitarbeiters " . $valuesAssocArray["userVorNachname"]));
             $mail->setText(utf8_decode("Sehr geehrte Damen und Herren,\n \nSie selbst oder Ihr Mitarbeiter/Ihre Mitarbeiterin \n" . $valuesAssocArray["userVorNachname"] . " hat sich soeben bei www.pdfix.de angemeldet. \n \nDer Account wurde angelegt.\n \nIm Anhang finden Sie unsere AGB und den Softwarelizenzvertrag.\nMit der Aktivierung des Accounts werden die AGB und Nutzungsbedingungen\nannerkannt.\n\nSobald die Abbuchungserklärung bei uns eingegangen ist,\nwird der Account innerhalb 24 Std. freigeschalten und\n\"pdfix\" kann dann genutzt werden.\n \nWenn Sie die Kosten übernehmen, dann klicken Sie auf\n\n\nnachstehenden Aktivierungslink.\n\nhttp://" . $_SERVER["HTTP_HOST"] . "" . str_replace("/ubiquitous/CustomerPage/index.php", "/ubiquitous/CustomerPage/?CC=RegistrationPDFix&activate={$token}", $_SERVER["SCRIPT_NAME"]) . "\n \n\nAnsonsten klären Sie bitte die Kostenübernahme mit Ihrem Mitarbeiter ab.\n\n \nMit freundlichen Grüßen\n \nM. Tischler\nGeschäftsführer\nETS-SÜD UG (haftungsbeschränkt)\nDR. Michael Samer Ring 2a\n86609 Donauwörth\nAG Augsburg\nHRB 26204\ninfo@pdfix.de"));
             /*
             Zum Download von pdfix besuchen Sie bitte
             http://www.meine-smn.de und klicken auf \"Login\"
             
             melden Sie sich an mit:
             
             Benutzername: ".$valuesAssocArray["userUsername"]."
             Passwort: ".$valuesAssocArray["userPassword"]."
             
             Bestätigen Sie jeweils am Ende der Seiten die AGB´s und Lizenzbedingungen und
             laden \"pdfix\" down.
             
             Sobald die Abbuchungserklärung bei uns eingegangen ist,
             wird der Account innerhalb 24 Std. freigeschalten,und
             \"pdfix\" kann dann genutzt werden.
             */
             #$mail->setTextCharset("UTF-8");
             #$mail->addAttachment(new fileAttachment(Util::getRootPath()."open3A/PDFix/abbuchungserkl.pdf", "application/pdf"));
             $mail->addAttachment(new fileAttachment(Util::getRootPath() . "../download/Agbs.pdf", "application/pdf"));
             $mail->addAttachment(new fileAttachment(Util::getRootPath() . "../download/Softwarelizenzvertrag.pdf", "application/pdf"));
             if (!$mail->send(array($valuesAssocArray["userEmail"]))) {
                 //from email
                 Red::errorD("Die E-Mail konnte nicht verschickt werden, bitte versuchen Sie es erneut!");
             }
             break;
         case "activate":
             $PU = anyC::getFirst("PDFixUser", "PDFixUserToken", $valuesAssocArray["token"]);
             $PU->changeA("PDFixUserActivatedDate", time());
             $PU->changeA("PDFixUserIsActive", "1");
             $PU->changeA("PDFixUserRate", $valuesAssocArray["zahlungsweise"]);
             $PU->saveMe();
             $mail = new htmlMimeMail5();
             $mail->setFrom("*****@*****.**");
             $mail->setSubject(utf8_decode("PDFix Registrierung ihres Mitarbeiters " . $valuesAssocArray["userVorNachname"]));
             $mail->setText(utf8_decode("Sehr geehrte Damen und Herren,\n \nIhr Account wurde soeben angelegt.\n \nBenutzername: " . $PU->A("PDFixUserUsername") . "\nPasswort: " . $PU->A("PDFixUserPassword") . "\n \nSobald die Abbuchungserklärung bei uns eingegangen ist,\nwird der Account innerhalb 24 Std. freigeschalten und\n\"pdfix\" kann dann genutzt werden.\n\t\n\nMit freundlichen Grüßen\n \nM. Tischler\nGeschäftsführer\nETS-SÜD UG (haftungsbeschränkt)\nDR. Michael Samer Ring 2a\n86609 Donauwörth\nAG Augsburg\nHRB 26204\ninfo@pdfix.de"));
             /*
             Zum Download von pdfix besuchen Sie bitte
             http://www.meine-smn.de und klicken auf \"Login\"
             
             melden Sie sich an mit:
             
             Bestätigen Sie jeweils am Ende der Seiten die AGB´s und Lizenzbedingungen und
             laden \"pdfix\" down.
             */
             #$mail->setTextCharset("UTF-8");
             if (!$mail->send(array($PU->A("PDFixUserEmail")))) {
                 Red::errorD("Die E-Mail konnte nicht verschickt werden, bitte versuchen Sie es erneut!");
             }
             $Adresse = new Adresse($PU->A("PDFixUserAdresseID"));
             $mail = new htmlMimeMail5();
             $mail->setFrom("*****@*****.**");
             $mail->setSubject("PDFix Aktivierung");
             $mail->setText(utf8_decode("\nFirma: " . $Adresse->A("firma") . "\nBenutzername: " . $PU->A("PDFixUserUsername") . ""));
             #$mail->setTextCharset("UTF-8");
             if (!$mail->send(array("*****@*****.**"))) {
                 Red::errorD("Die E-Mail konnte nicht verschickt werden, bitte versuchen Sie es erneut!");
             }
             break;
     }
 }
<?php

require_once 'htmlMimeMail5.php';
$mail = new htmlMimeMail5();
/**
 * Set the from address of the email
 */
$mail->setFrom('Envisage Media Pvt. Ltd. <*****@*****.**>');
/**
 * Set the subject of the email
 */
$sub = "Cafe Payment Details";
$mail->setSubject($sub);
/**
 * Set high priority for the email. This can also be:
 * high/normal/low/1/3/5
 */
$mail->setPriority('high');
/**
 * Set the text of the Email
 */
// $mail->setText('Sample text');
/**
 * Set the HTML of the email. Any embedded images will be automatically found as long as you have added them
 * using addEmbeddedImage() as below.
 */
$date = date("Y-m-d", mktime(0, 0, 0, date("m"), date("d") - 1, date("Y")));
$htmlMailTemplate = '<p><b>Dear Recipient</b>,</p>
        
        <br>
          <a href="http://www.emmgts.com/export/export_pay_details.php?w=1">Download Payment Details Sheet</a>
Beispiel #23
0
<?php

/**
 * o------------------------------------------------------------------------------o
 * | This package is licensed under the Phpguru license. A quick summary is       |
 * | that for commercial use, there is a small one-time licensing fee to pay. For |
 * | registered charities and educational institutes there is a reduced license   |
 * | fee available. You can read more  at:                                        |
 * |                                                                              |
 * |                  http://www.phpguru.org/static/license.html                  |
 * o------------------------------------------------------------------------------o
 *
 * © Copyright 2008,2009 Richard Heyes
 */
require_once 'htmlMimeMail5.php';
$mail = new htmlMimeMail5();
/**
 * Set the from address of the email
 */
$mail->setFrom('Envisage Media Pvt. Ltd. <*****@*****.**>');
/**
 * Set the subject of the email
 */
$mail->setSubject('Test email');
/**
 * Set high priority for the email. This can also be:
 * high/normal/low/1/3/5
 */
$mail->setPriority('high');
/**
 * Set the text of the Email
function sendMailToCafe($cafe_user_id, $password, $email)
{
    require_once '../classes/mail/htmlMimeMail5.php';
    $mail = new htmlMimeMail5();
    $mail->setFrom('Envisage Media Pvt. Ltd. <*****@*****.**>');
    $mail->setSubject('Cafe Registration Confirmation');
    $mail->setPriority('high');
    $mail->setText('Cafe Registration');
    $html_msg = '<div style="width:550px; float:left; background:#f1f1f1">
  <div style="padding:10px;">
    <Div style="background:#FFFFFF; padding:15px">
      <div style="font-family:Arial, Helvetica, sans-serif; font-size:11px; color:#333333; line-height:16px; text-decoration:none"><img src="http://www.emmgts.com/images/logo.gif" alt="" width="151" height="46" /><br />
          <br />
        <br />
        Dear Cyber Caf&ecirc; Owner,<br />
<br />

A warm welcome to the Envisage Media Family.<br />
<br />
<br>
          Your Cafe has been activated </br>
		  
		  Your cafe id is :' . $cafe_user_id . '
		  </br>
		  Your Password : '******'
          
        </p>
It is our pleasure to be associated with you. With your cooperation we look forward to both of us reaching great level of success. We can assure you this will be mutually beneficial collaboration.<br />
<br />
You can check your payment status regularly by visiting the following 
URL:<br>
<a href="http://cafe.emmgts.com" target="_blank" style="text-decoration:none"> http://cafe.emmgts.com</a> using your caf&ecirc; ID: ' . $cafe_user_id . ' and the password: '******'
<br />
<br />
You can also access your payment details by logging in from our website: <br />
<a href="http://www.envisagemedia.in" target="_blank" style="text-decoration:none">http://www.envisagemedia.in</a> by clicking on the "Associates" login tab.
<br />
<br />
From now onwards, you will get your payment either by online transfer or by demand draft between the 1st and 10th of every month. Our tele-executive will call you shortly so please help us by providing the required information. 
<br />
      <br />
      <br />
      <strong>Payment Terms and Conditions </strong>
<ol style="margin-left:35px;margin-right:5px; padding:0px; margin-top:10px"><li>Money will keep getting added on a daily basis</li>
<li>You will get a fixed daily amount. (Monthly amount divide by the number of days)</li>
<li>Your systems should be live for a minimum of 4 hours to get the days payment.</li>
<li>Live means there should be use of your system for a minimum of 4 hours a day or you can say minimum 4 users use your system.</li>
<li>Your payment cycle will shift on 1st of next month</li></ol><br />
<strong>Installation process</strong><br />
<br />

<font color="#FF0000"><strong>Step 1:</strong></font> Download setup file using following URL www.envisagemedia.in/EMDesktop.msi 
Or download the product from our website <a href="http://www.envisagemedia.in" target="_blank" style="text-decoration:none">www.envisagemedia.in</a> (Product page)
<br />
<br />
<font color="#FF0000"><strong>Step 2: </strong></font>Run the setup file while double clicking on it.
<br />
<br />
<font color="#FF0000"><strong>Step 3:</strong></font> Fill your caf&ecirc; ID which will when the installation is in progress. As shown below:
<br />
<br />
<img src="http://www.emmgts.com/images/img1.jpg" alt="" width="448" height="371" /><br />
<br />
As the installation process will end.<br />
<br />
<font color="#FF0000"><strong>Step 4:</strong></font> Log off your PC once and then login.<br />
<br />
You will find EMDesktop will be running on your desktop screen
Also, please update your contact details with our tele-caller so we can keep you updated.
<br />
<br />
<br />
Warm Regards,<br /> 
Team - <strong><font color="#3277d9"> Envisage Media Pvt. Ltd</font><br />
</strong>
Office Phone: 011-46027732 
<br />
Mobile: +91-9582111906<br /> 
90/27A Malviya Nagar,
New Delhi - 110017
<br />

</div>
    </Div>
  </div>
</div>

<p><img src="http://www.emmgts.com/classes/mail/background.gif" width="1024" height="6" /><img src="http://www.emmgts.com/classes/mail/4.jpg" width="137" height="40" /></p> ';
    $mail->setHTML($html_msg);
    $mail->setReceipt('*****@*****.**');
    $mail->addEmbeddedImage(new fileEmbeddedImage('../classes/mail/background.gif'));
    $mail->addEmbeddedImage(new fileEmbeddedImage('../classes/mail/4.jpg'));
    $mail_envi = '*****@*****.**';
    $result = $mail->send(array($email, $mail_envi, '*****@*****.**', '*****@*****.**'));
    return $result;
}
 public function testMail($mailfrom, $mailto)
 {
     #parse_str($data, $out);
     #print_r($out);
     if ($mailfrom == "") {
         Red::errorD("Bitte geben Sie einen Absender ein!");
     }
     if ($mailto == "") {
         Red::errorD("Bitte geben Sie einen Empfänger ein!");
     }
     try {
         $mail = new htmlMimeMail5(substr($mailfrom, stripos($mailfrom, "@") + 1));
     } catch (Exception $e) {
         die("<p style=\"padding:5px;color:red;\">Fehler beim Übergeben der E-Mail. " . $e->getMessage() . "</p>");
     }
     $mail->setFrom("phynx Mailtest <" . $mailfrom . ">");
     if (!ini_get('safe_mode')) {
         $mail->setReturnPath($mailfrom);
     }
     $mail->setSubject("phynx Mailtest");
     $mail->setText(wordwrap("Diese Nachricht wurde vom phynx Mailtester erzeugt. Ihre E-Mail-Einstellungen sind korrekt.", 80));
     $adressen = array();
     $adressen[] = $mailto;
     if ($mail->send($adressen)) {
         echo "<p style=\"padding:5px;color:green;\">E-Mail erfolgreich übergeben.</p>";
     } else {
         echo "<p style=\"padding:5px;color:red;\">Fehler beim Übergeben der E-Mail. Bitte überprüfen Sie Ihre Server-Einstellungen.<br />Fehler: " . nl2br(print_r($mail->errors, true)) . "</p>";
     }
     /*$mimeMail2 = new PHPMailer(false, substr($mailfrom, stripos($mailfrom, "@") + 1));
     		$mimeMail2->CharSet = "UTF-8";
     		$mimeMail2->Subject = "phynx Mailtest V2";
     		
     		$mimeMail2->From = $mailfrom;
     		$mimeMail2->Sender = $mailfrom;
     		$mimeMail2->FromName = "phynx Mailtest";
     		
     		$mimeMail2->Body = wordwrap("Diese Nachricht wurde vom phynx Mailtester erzeugt. Ihre E-Mail-Einstellungen sind korrekt.", 80);
     		$mimeMail2->AddAddress($mailto);
     		
     		if($mimeMail2->Send())
     			echo "<p style=\"padding:5px;color:green;\">E-Mail 2 erfolgreich übergeben.</p>";
     		else
     			echo "<p style=\"padding:5px;color:red;\">Fehler beim Übergeben der E-Mail 2. Bitte überprüfen Sie Ihre Server-Einstellungen.<br />Fehler: ".nl2br(print_r($mimeMail2->ErrorInfo, true))."</p>";*/
 }
/**
 * $Id: email.php,v 1.2 2007/07/26 23:46:24 mbasteaf Exp $
 *
 * This Script takes the following params as POST arguments.
 *
 * share - the share ID
 * to - a username to send email to @yahoo-inc.com
 * from - a username to send email from @yahoo-inc.com
 * cc - if set, message will be CCed to the owner
 * jpeg - a Base64 Encoded JPG
 * comment - a note to attach
 * personal - if set, message will be marked private
 * title - the talk's title
 * author - the talk's author
 * duration - duration of the clip
 * durationTotal - total duration of the source media
 * tags - a CSV list of tags
 */
require_once "util/htmlMimeMail5.php";
$to = $_POST['email'];
$subject = $_POST['subject'];
$message = $_POST['message'];
// from: http://www.phpguru.org/static/htmlMimeMail5.html
$mail = new htmlMimeMail5();
// Get this from the cookie?
$mail->setFrom(yck_cookie_get_login() . "@yahoo.com");
$mail->setSubject("Media Share from Happenings: " . $subject);
$mail->setText($message);
$to = $to;
echo $mail->send(array($to));