Source for file class.MAIL.php
Documentation is available at class.MAIL.php
* Stellt Methoden zur Verschickung von Emails zur Verfügung
* Es gibt nur eine Instanz dieser Klasse (singleton)
die('This file was generated for PHP 5');
* include src_mail_htmlMimeMail5
* @author Kay Koch, <kay.koch@gmx.de>
require_once ('src/mail/class.htmlMimeMail5.php');
/* user defined includes */
// section -64--88-122--2-933bcb:100f60e4e57:-7fc4-includes begin
// section -64--88-122--2-933bcb:100f60e4e57:-7fc4-includes end
/* user defined constants */
// section -64--88-122--2-933bcb:100f60e4e57:-7fc4-constants begin
// section -64--88-122--2-933bcb:100f60e4e57:-7fc4-constants end
* Stellt Methoden zur Verschickung von Emails zur Verfügung
* Es gibt nur eine Instanz dieser Klasse (singleton)
private static $oInstance =
null;
* Name des Startscriptes der Anwendung
private $scriptName =
'';
* Verschickt eine Mail zur Bestätigung der Buchung.
* Die Mail beinhaltet alle relevanten Angaben und einen Link zur
* Bestätigung durch den Benutzer
* @author Kay Koch, <kay.koch@gmx.de>
$returnValue = (bool)
false;
// section -64--88-122--2-933bcb:100f60e4e57:-7fc3 begin
$this->link =
$this->scriptName .
"?buch_id=" .
$buchung['buch_id'] .
"&pwd=" .
$buchung['pwd'] .
"&confirm=t&action=bestaetigung"; // Link zur Bestätigung
$this->to =
$buchung['vorname'] .
" " .
$buchung['name']; // Anrede
$this->deleteTime =
$this->getDeleteTime(); // Datum/Uhrzeit bis Löschung der Anmeldung
$mail->setTextCharset("UTF-8");
$mail->setSubject("Reservierung: " .
$buchung['seename'] .
" / " .
$buchung['realdatum']);
$mail->setFrom($this->getFormatedEmail($oSee->oAnsprechpartner));
if (!@ $mail->send(array ( $buchung['email']))) // mail wird gesendet
// section -64--88-122--2-933bcb:100f60e4e57:-7fc3 end
return (bool)
$returnValue;
* sendet eine Wochenmail mit dem PDF als Anhang
* @author Kay Koch, <kay.koch@gmx.de>
public function sendWeekMail($oSee, $pdfLocation =
'', $datum =
null)
$returnValue = (bool)
false;
// section -64--88-122--2-1328c7a:1027db0d532:-7ff5 begin
$this->link =
$this->url .
$pdfLocation; // Link zur Bestätigung
$this->to =
$oSee->oVorOrtKontakt->vorname .
" " .
$oSee->oVorOrtKontakt->name; // Anrede
$mail->setSubject("Wochenbericht - " .
$oSee->name .
"_" .
$datum);
$mail->setFrom($this->getFormatedEmail($oLVSTKontakt));
$mail->setCc($this->getFormatedEmail($oSee->oAnsprechpartner));
$mail->setBcc("kay.koch@gmx.de");
if (!@ $mail->send(array ($oSee->oVorOrtKontakt->email ))) // mail wird gesendet
// section -64--88-122--2-1328c7a:1027db0d532:-7ff5 end
return (bool)
$returnValue;
* erstellt einen Header für die Anmeldungsemail
* @author Kay Koch, <kay.koch@gmx.de>
private function getFormatedEmail($oEinkontakt)
$returnValue = (string)
'';
// section -64--88-122--2-27bfcc9b:103db49df5b:-7fde begin
$returnValue =
$oEinkontakt->vorname .
" " .
$oEinkontakt->name .
" <" .
$oEinkontakt->email .
">";
// section -64--88-122--2-27bfcc9b:103db49df5b:-7fde end
return (string)
$returnValue;
* erstellt eine Instanz der Klasse und speichert die Admin-Adresse
* @author Kay Koch, <kay.koch@gmx.de>
// section -64--88-122--2-339007d5:1043cd4e8c9:-7fb6 begin
if (!isset
(self :: $oInstance))
self :: $oInstance =
new $c;
self :: $oInstance->setScriptName();
$returnValue =
self :: $oInstance;
// section -64--88-122--2-339007d5:1043cd4e8c9:-7fb6 end
* setzt den Namen des Startscriptes und die URL
* @author Kay Koch, <kay.koch@gmx.de>
private function setScriptName()
// section -64--88-122--2-339007d5:1043cd4e8c9:-7fae begin
$this->url =
"http://" .
$_SERVER['SERVER_NAME'] .
dirname($_SERVER['SCRIPT_NAME']) .
"/";
$this->scriptName =
"http://" .
$_SERVER['SERVER_NAME'] .
$_SERVER['SCRIPT_NAME'];
// section -64--88-122--2-339007d5:1043cd4e8c9:-7fae end
* nicht benutzt da Singleton
* @author Kay Koch, <kay.koch@gmx.de>
private function __construct()
// section -64--88-122--2-b711fbe:103b621333c:-7fd4 begin
// section -64--88-122--2-b711fbe:103b621333c:-7fd4 end
* liefert das Datum bis zum Verfall der Buchung
* @author Kay Koch, <kay.koch@gmx.de>
private function getDeleteTime()
$returnValue = (string)
'';
$dayOfChange =
$oFlags->dayOfChange;
$timeOfChange =
$oFlags->timeOfChange;
// Datum/Uhrzeit bis Löschung der Anmeldung
if ($dayOfOrder ==
$dayOfChange) // heute wird um $timeOfChange die woch abgeschlossen
$returnValue =
strftime("%A - %d. %B %Y um ", time()) .
$timeOfChange .
"h (!! HEUTE ABEND !!)"; // verkürzt auf 23:00h
$returnValue =
strftime("%A - %d. %B %Y um %H:%Mh", time() +
24 *
60 *
60); // in 24 Stunden
return (string)
$returnValue;
} /* end of class src_mail_MAIL */
Documentation generated on Sat, 24 Mar 2007 09:59:36 +0100 by phpDocumentor 1.3.1