Compare commits

..

8 Commits

9 changed files with 228 additions and 142 deletions

View File

@ -51,28 +51,58 @@ class MailAttachmentData implements MailAttachmentInterface
$this->cid = $cid;
}
/*
Check the type of Attachment
Possible results: application/octet-stream, attachment, inline
*/
public static function getAttachmentPartType(MailMessagePartInterface $part): ?string {
if (!$part->isMultipart()) {
$header = $part->getHeader('content-disposition');
if ($header !== null) {
$split = explode(';', $header->getValue());
if ($split[0] === 'attachment') {
return ('attachment');
} else if ($split[0] === 'inline') {
return ('inline');
}
} else { // Check for application/octet-stream
$content_type = $part->getContentType();
if ($content_type == 'application/octet-stream') {
return('application/octet-stream');
}
}
}
return(null);
}
/**
* @param MailMessagePartInterface $part
*
* @throws InvalidArgumentException
*
* @return MailAttachmentData
*/
public static function fromMailMessagePart(MailMessagePartInterface $part): MailAttachmentData
{
$encodingHeader = $part->getHeader('content-transfer-encoding');
if ($encodingHeader === null) {
// Assume this is no error (?) throw new InvalidArgumentException('missing header: "Content-Transfer-Encoding"');
$encoding = '';
} else {
$encoding = $encodingHeader->getValue();
}
$dispositionHeader = $part->getHeader('content-disposition');
if ($dispositionHeader === null) {
throw new InvalidArgumentException('missing header: "Content-Disposition"');
}
$disposition = $dispositionHeader->getValue();
$attachmenttype = MailAttachmentData::getAttachmentPartType($part);
if ($attachmenttype == null) {
throw new InvalidArgumentException('object is no attachment');
}
$disposition = $part->getHeaderValue('content-disposition');
if ($disposition == null) {
$disposition = '';
}
$disposition = str_replace(["\n\r", "\n", "\r"], '', $disposition);
// file_put_contents('debug.txt',date("HH:mm:ss")."\nDispo: ".$disposition); // FILE_APPEND
// Determine filename
/*
Content-Disposition: inline
Content-Disposition: attachment
@ -81,60 +111,29 @@ class MailAttachmentData implements MailAttachmentInterface
This is not correctly implemented -> only the first string is evaluated
Content-Disposition: attachment; filename*0="filename_that_is_"
Content-Disposition: attachment; filename*1="very_long.jpg"
*/
if (preg_match('/(.+);\s*filename(?:\*[0-9]){0,1}="([^"]+)".*$/m', $disposition, $matches)) {
$isInline = strtolower($matches[1]) === 'inline';
$filename = 'OpenXE_file.unknown';
if (preg_match('/(.+);\s*filename(?:\*[0-9]){0,1}="*([^"]+)"*.*$/m', $disposition, $matches)) { // Filename in disposition
$filename = $matches[2];
}
else if ($disposition == 'attachment') {
// Filename is given in Content-Type e.g.
/* Content-Type: application/pdf; name="Filename.pdf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment
*/
} else {
$contenttype = $part->getHeaderValue('content-type');
$contenttypeHeader = $part->getHeader('content-type');
if ($contenttypeHeader === null) {
throw new InvalidArgumentException('missing header: "Content-Type"');
}
$contenttype = $contenttypeHeader->getValue();
$contenttype = str_replace(["\n\r", "\n", "\r"], '', $contenttype);
if (preg_match('/(.+);\s*name(?:\*[0-9]){0,1}="([^"]+)".*$/m', $contenttype, $matches)) {
$isInline = strtolower($matches[1]) === 'inline';
// file_put_contents('debug.txt',date("HH:mm:ss")."\nConttype: ".$contenttype,FILE_APPEND); // FILE_APPEND
if (preg_match('/(.+);\s*name(?:\*[0-9]){0,1}="*([^"]+)"*.*$/m', $contenttype, $matches)) { // Name in content-type
$filename = $matches[2];
} else {
throw new InvalidArgumentException(
sprintf('missing filename in header value "Content-Type" = "%s"', $contenttype)
);
} else if ($contenttype == 'message/rfc822') { // RFC822 message
$filename = 'ForwardedMessage.eml';
}
}
else if ($disposition == 'inline') {
$isInline = true;
$filename = ""; // This is questionable
}
else if (strpos($disposition,'attachment;\n') == 0) { // No filename, check for content type message/rfc822
$contenttypeHeader = $part->getHeader('content-type');
if ($contenttypeHeader === null) {
throw new InvalidArgumentException('missing header: "Content-Type"');
}
$contenttype = $contenttypeHeader->getValue();
if ($contenttype == 'message/rfc822') {
$isInline = false;
$filename = 'ForwardedMessage.eml';
} else {
throw new InvalidArgumentException(
sprintf('unexpected header value "Content-Disposition" = "%s"', $disposition)
);
}
}
else {
throw new InvalidArgumentException(
sprintf('unexpected header value "Content-Disposition" = "%s", not message/rfc822', $disposition)
);
$encodingHeader = $part->getHeader('content-transfer-encoding');
if ($encodingHeader === null) {
$content_transfer_encoding = '';
} else {
$content_transfer_encoding = $encodingHeader->getValue();
}
// Thunderbird UTF URL-Format
@ -144,8 +143,7 @@ class MailAttachmentData implements MailAttachmentInterface
$filename = substr($filename,$UTF_pos);
$filename = rawurldecode($filename);
}
$cid = null;
$contentIdHeader = $part->getHeader('content-id');
if ($contentIdHeader !== null) {
@ -154,13 +152,24 @@ class MailAttachmentData implements MailAttachmentInterface
$cid = $cidMatches[1];
}
}
if ($attachmenttype == 'inline' && $cid != null) {
$filename = "cid:".$cid;
}
$content = $part->getContent();
if ($content === null) { // This should not be
// file_put_contents('debug.txt',date("HH:mm:ss")."\n".print_r($part,true)); // FILE_APPEND
throw new InvalidArgumentException(
sprintf('content is null "%s"', substr(print_r($part,true),0,1000))
);
}
return new self(
$filename,
$part->getContent(),
$content,
$part->getContentType(),
$encoding,
$isInline,
$content_transfer_encoding,
$attachmenttype == 'inline',
$cid
);
}

View File

@ -147,6 +147,7 @@ final class MailMessageData implements MailMessageInterface, JsonSerializable
$parts = [];
$this->findAttachmentParts($this->contentPart, $parts);
$attachments = [];
foreach ($parts as $part) {
$attachments[] = MailAttachmentData::fromMailMessagePart($part);
}
@ -161,19 +162,17 @@ final class MailMessageData implements MailMessageInterface, JsonSerializable
* @return void
*/
private function findAttachmentParts(MailMessagePartInterface $part, array &$resultArray): void
{
try {
$header = $part->getHeader('content-disposition');
$split = explode(';', $header->getValue());
if ($split[0] === 'attachment' || $split[0] === 'inline') {
$resultArray[] = $part;
{
return;
}
} catch (Throwable $e) {
if ($part->isMultipart()) {
// Recurse subparts
for ($i = 0; $i < $part->countParts(); $i++) {
$this->findAttachmentParts($part->getPart($i), $resultArray);
}
} else {
if (MailAttachmentData::getAttachmentPartType($part) != null) {
$resultArray[] = $part;
}
}
}

View File

@ -83,6 +83,18 @@ final class MailMessagePartData implements MailMessagePartInterface, JsonSeriali
return $this->headers[strtolower($name)];
}
/**
* @inheritDoc
*/
public function getHeaderValue(string $name): ?string
{
$header = $this->getHeader($name);
if ($header == null) {
return (null);
}
return($header->getValue());
}
/**
* @inheritDoc
*/
@ -97,6 +109,33 @@ final class MailMessagePartData implements MailMessagePartInterface, JsonSeriali
return $split[0];
}
/**
* @inheritDoc
*/
public function getCharset(): ?string
{
$header = $this->getHeader('content-type');
if ($header === null) {
return '';
}
$pattern = "/([a-zA-Z]*[\/]*[a-zA-Z]*);[a-zA-Z\n\t\r0-9 ]*charset=\"([a-zA-Z-0-9]+)\"/i";
$matches = array();
if (preg_match(
$pattern,
$header->getValue(),
$matches
)) {
if (count($matches) >= 3) {
return($matches[2]);
} else {
return(null);
}
}
else {
return(null);
}
}
/**
* @inheritDoc
*/
@ -116,17 +155,30 @@ final class MailMessagePartData implements MailMessagePartInterface, JsonSeriali
/**
* @return string|null
*/
public function getDecodedContent(): ?string
public function getDecodedContent(string $to_charset = 'UTF-8'): ?string
{
$result = '';
if ($this->content === null) {
return null;
}
$encodingHeader = $this->getHeader('content-transfer-encoding');
if ($encodingHeader === null ) {
return $this->content;
$result = $this->content;
}
else {
$result = $this->decode($this->content, $encodingHeader->getValue());
}
return $this->decode($this->content, $encodingHeader->getValue());
$charset = $this->getCharset();
// throw new InvalidArgumentException('Charset is '.$charset." Text is: ".$result);
$converted = mb_convert_encoding(
$result,
$to_charset,
$charset
);
return($converted);
}
/**

View File

@ -209,7 +209,7 @@ class TicketImportHelper
return($candidate);
}
if ($loopCounter > 99) {
if ($loopCounter > 9999) {
throw new NumberGeneratorException('ticket number generation failed');
}
$loopCounter++;
@ -289,10 +289,10 @@ class TicketImportHelper
FROM `ticket_regeln` AS `tr`
WHERE
tr.aktiv = 1
AND ('".$recipientMail."' LIKE tr.empfaenger_email OR tr.empfaenger_email = '')
AND ('".$senderMail."' LIKE tr.sender_email OR tr.sender_email = '')
AND ('".$senderMail."' LIKE tr.name OR tr.name = '')
AND ('".$subject."' LIKE tr.betreff OR tr.betreff = '')";
AND ('".$this->db->real_escape_string($recipientMail)."' LIKE tr.empfaenger_email OR tr.empfaenger_email = '')
AND ('".$this->db->real_escape_string($senderMail)."' LIKE tr.sender_email OR tr.sender_email = '')
AND ('".$this->db->real_escape_string($senderMail)."' LIKE tr.name OR tr.name = '')
AND ('".$this->db->real_escape_string($subject)."' LIKE tr.betreff OR tr.betreff = '')";
$this->logger->debug('ticket rule',['sql' => $sql]);
@ -483,6 +483,9 @@ class TicketImportHelper
{
$insertedMailsCount = 0;
foreach ($inboxMessageIds as $messageNumber) {
$this->logger->debug("Fetch $messageNumber", ['']);
try {
$message = $this->mailClient->fetchMessage((int)$messageNumber);
} catch (Throwable $e) {
@ -491,7 +494,8 @@ class TicketImportHelper
}
try {
$this->logger->debug('Start import', ['message' => $message]);
// $this->logger->debug('Start import', ['message' => substr(print_r($message,true),1000)]);
$this->logger->debug('Start import '.$messageNumber, []);
$result = $this->importMessage($message);
@ -503,10 +507,11 @@ class TicketImportHelper
$this->mailClient->setFlags((int)$messageNumber, ['\\Seen']);
}
} else {
$this->logger->error('Error during email import', ['']);
$this->logger->error('Error during email import '.$messageNumber, ['message' => substr(print_r($message,true),0,1000)]);
continue;
}
} catch (Throwable $e) {
$this->logger->error('Error during email import', ['exception' => $e]);
$this->logger->error('Error during email import '.$messageNumber, ['message' => substr(print_r($message,true),0,1000)]);
continue;
}
}
@ -550,7 +555,7 @@ class TicketImportHelper
if ($plainTextBody == '' && $htmlBody == '') {
$simple_content = $message->getContent();
if (empty($simple_content)) {
$this->logger->debug('Empty mail',['message' => $message]);
$this->logger->debug('Empty mail',[]);
} else {
$plainTextBody = $simple_content;
$htmlBody = nl2br(htmlentities($simple_content));
@ -591,9 +596,17 @@ class TicketImportHelper
if ($result == 0) {
$this->logger->debug('Importing message',['message' => $message]);
// $this->logger->debug('Importing message',['message' => substr(print_r($message,true),1000)]);
$this->logger->debug('Importing message attachments',[]);
try {
$attachments = $message->getAttachments();
}
catch (Throwable $e) {
$this->logger->error('Error while getting attachments',['exception' => $e]);
return(false);
}
$attachments = $message->getAttachments();
$anhang = count($attachments) > 0 ? 1 : 0;
$mailacc = $this->mailAccount->getEmailAddress();
$mailaccid = $this->mailAccount->getId();

View File

@ -16800,7 +16800,8 @@ INSERT INTO `prozessstarter` (`id`, `bezeichnung`, `bedingung`, `art`, `startzei
(6, 'Überzahlte Rechnungen', '', 'uhrzeit', '2015-10-25 23:00:00', '0000-00-00 00:00:00', '', 'cronjob', 'ueberzahlterechnungen', 0, 0, 0, 1, ''),
(7, 'Umsatzstatistik', '', 'uhrzeit', '2015-10-25 23:30:00', '0000-00-00 00:00:00', '', 'cronjob', 'umsatzstatistik', 0, 0, 0, 1, ''),
(8, 'Paketmarken Tracking Download', '', 'uhrzeit', '2015-10-25 14:00:00', '0000-00-00 00:00:00', '', 'cronjob', 'wgettracking', 0, 0, 0, 1, ''),
(9, 'Chat-Benachrichtigung', '', 'periodisch', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '60', 'cronjob', 'chat', 0, 0, 0, 1, '');
(9, 'Lagerhistorie', '', 'uhrzeit', '2015-10-25 00:00:00', '0000-00-00 00:00:00', '', 'cronjob', 'lagerwert', 0, 0, 0, 1, ''),
(10, 'Chat-Benachrichtigung', '', 'periodisch', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '60', 'cronjob', 'chat', 0, 0, 0, 1, '');
INSERT INTO `user` (`id`, `username`, `password`, `repassword`, `description`, `settings`, `parentuser`, `activ`, `type`, `adresse`, `fehllogins`, `standarddrucker`, `firma`, `logdatei`, `startseite`, `hwtoken`, `hwkey`, `hwcounter`, `motppin`, `motpsecret`, `passwordmd5`, `externlogin`, `projekt_bevorzugen`, `email_bevorzugen`, `projekt`, `rfidtag`, `vorlage`, `kalender_passwort`, `kalender_ausblenden`, `kalender_aktiv`, `gpsstechuhr`, `standardetikett`, `standardfax`, `internebezeichnung`, `hwdatablock`, `standardversanddrucker`, `passwordsha512`, `salt`) VALUES
(1, 'admin', 'qnvEQ1sFWNdIg', 0, 'Administrator', 'firstinstall', 0, 1, 'admin', 1, 0, 0, 1, '2016-08-05 08:34:59', NULL, NULL, NULL, NULL, NULL, NULL, '21232f297a57a5a743894a0e4a801fc3', 1, 0, 1, 0, '', NULL, NULL, 0, NULL, NULL, 0, 0, NULL, NULL, 0, '', '');

View File

@ -18,7 +18,8 @@ class ContentDisposition implements UnstructuredInterface
*
* @var int
*/
const MAX_PARAMETER_LENGTH = 76;
// const MAX_PARAMETER_LENGTH = 76; // This is the RECOMMENDATION
const MAX_PARAMETER_LENGTH = 996; // This is the LIMIT
/**
* @var string

View File

@ -31,18 +31,13 @@
<form method="POST">
<table class="option-table">
<tr>
<td>{|Datum|}:</td><td><input type="text" [DATUMDISABLED] id="datum" name="datum" value="[DATUM]" onchange="holedatum()"/></td>
<td>{|Artikel|}:</td><td><input type="text" id="artikel" name="artikel" value="[ARTIKEL]" size="40"></td>
<td>{|Artikelkategorie|}:</td><td><input type="text" id="artikelkategorie" name="artikelkategorie" value="[ARTIKELKATEGORIE]" size="40"></td>
<td>{|Datum|}:</td><td><input type="text" id="datum" name="datum" value="[DATUM]"/></td>
<td>{|Preis|}:</td>
<td>
<select id="preisart" name="preisart">
<option value="letzterek" [LETZTEREK]>{|Letzter EK (live mit aktuellem Wert)|}</option>
<option value="kalkulierterek" [KALKULIERTEREK]>{|kalkulierter EK (live mit aktuellem Wert)|}</option>
<option value="inventurwert" [INVENTURWERT]>{|Inventurwert (live mit aktuellem Wert)|}</option>
<option value="letzterekarchiv" [LETZTEREKARCHIV]>{|Letzter EK (nur aus Archiv)|}</option>
<option value="kalkulierterekarchiv" [KALKULIERTEREKARCHIV]>{|kalkulierter EK (nur aus Archiv)|}</option>
<option value="inventurwertarchiv" [INVENTURWERTARCHIV]>{|Inventurwert (nur aus Archiv)|}</option>
<option value="letzterek" [LETZTEREK]>{|EK aus Einkaufspreisen|}</option>
<option value="kalkulierterek" [KALKULIERTEREK]>{|Kalkulierter EK (wenn vorhanden)|}</option>
<option value="inventurwert" [INVENTURWERT]>{|Inventurwert (wenn vorhanden)|}</option>
</select>
</td>
<td>
@ -54,7 +49,7 @@
<label for="preiseineuro">{|alle Preise in EUR anzeigen|}</label>
</td>
<td>
<input type="submit" value="{|laden|}" name="laden"/>
<input type="submit" value="{|Laden|}" name="laden"/>
</td>
</tr>
</table>
@ -66,26 +61,3 @@
<!-- tab view schließen -->
</div>
<script>
function holedatum(){
var datum = $('#datum').val();
$.ajax({
url: 'index.php?module=lager&action=wert&cmd=datumpruefen&datum='+datum,
type: 'POST',
dataType: 'json',
data: {},
success: function(data) {
if(data == ''){
document.getElementById('datumsinfobox').style.display = 'none';
}else{
document.getElementById('datumsinfobox').style.display = '';
document.getElementById('datumsinfobox').innerHTML = '<div id="infoberechnung">Vor dem '+data+' liegen keine Berechnungen f&uuml;r Lagerbewegungen vor.</div>';
}
},
beforeSend: function() {
}
});
}
</script>

View File

@ -606,20 +606,13 @@ class Lager extends GenLager {
$app->erp->CheckColumn("kurskalk","DECIMAL(19,8)", "lagerwert", "NOT NULL DEFAULT '0'");
$app->erp->CheckColumn("kursletzt","DECIMAL(19,8)", "lagerwert", "NOT NULL DEFAULT '0'");
}
$preisart = (String)$app->YUI->TableSearchFilter($name, 1, 'preisart', $app->User->GetParameter("lager_wert_preisart"));
if($preisart == '')
{
$preisart = 'letzterek';
}
$artikel = (String)$app->YUI->TableSearchFilter($name, 2, 'artikel', $app->User->GetParameter("lager_wert_artikel"));
if($artikel)
{
$artikel = explode(' ', $artikel);
$artikel = $app->DB->Select("SELECT id FROM artikel WHERE nummer = '".reset($artikel)."' AND (geloescht = 0 OR isnull(geloescht)) LIMIT 1");
}
$datum = (String)$app->YUI->TableSearchFilter($name, 3, 'datum', $app->User->GetParameter("lager_wert_datum"));
// Get HTML form values
$preisart = $app->User->GetParameter('preisart');
$datum = $app->User->GetParameter('datum');
$gruppierenlager = $app->User->GetParameter('gruppierenlager');
$preiseineuro = $app->User->GetParameter('preiseineuro');
if($datum)
{
$datum = $app->String->Convert($datum, '%1.%2.%3', '%3-%2-%1');
@ -651,8 +644,7 @@ class Lager extends GenLager {
$lagerplatz = explode(' ', $lagerplatz);
$lagerplatz = $app->DB->Select("SELECT id FROM lager_platz WHERE kurzbezeichnung = '".reset($lagerplatz)."' AND (geloescht = 0 OR isnull(geloescht)) LIMIT 1");
}
$gruppierenlager = (int)$app->YUI->TableSearchFilter($name, 6, 'gruppierenlager', $app->User->GetParameter("lager_wert_gruppierenlager"),0,'checkbox');
$preiseineuro = (int)$app->YUI->TableSearchFilter($name, 7, 'preiseineuro', $app->User->GetParameter("lager_wert_preiseineuro"),0,'checkbox');
if($preiseineuro)
{
$kursusd = $app->erp->GetWaehrungUmrechnungskurs('EUR','USD');
@ -1521,7 +1513,8 @@ class Lager extends GenLager {
$this->app->ActionHandler("artikelentfernenreserviert", "LagerArtikelEntfernenReserviert");
$this->app->ActionHandler("letztebewegungen", "LagerLetzteBewegungen");
$this->app->ActionHandler("schnelleinlagern", "LagerSchnellEinlagern");
$this->app->ActionHandler("wert", "LagerWert");
$this->app->ActionHandler("wert2", "LagerWert2");
$this->app->ActionHandler("schnellumlagern", "LagerSchnellUmlagern");
$this->app->ActionHandler("schnellauslagern", "LagerSchnellAuslagern");
@ -2073,11 +2066,42 @@ class Lager extends GenLager {
public function LagerWert()
{
$this->LagerHauptmenu();
$this->app->Tpl->Set('VERS','Professional');
/* $this->app->Tpl->Set('VERS','Professional');
$this->app->Tpl->Set('MODUL','Professional');
$this->app->Tpl->Parse('PAGE', 'only_version.tpl');
$this->app->Tpl->Parse('PAGE', 'only_version.tpl');
ROFLMAO
*/
// Transfer Parameters to TableSearch
$gruppierenlager = $this->app->Secure->GetPOST('gruppierenlager');
$this->app->User->SetParameter('gruppierenlager', $gruppierenlager);
$preiseineuro = $this->app->Secure->GetPOST('preiseineuro');
$this->app->User->SetParameter('preiseineuro', $preiseineuro);
$datum = $this->app->Secure->GetPOST('datum');
$this->app->User->SetParameter('datum', $datum);
$preisart = $this->app->Secure->GetPOST('preisart');
$this->app->User->SetParameter('preisart', $preisart);
$this->app->YUI->DatePicker("datum");
$this->app->Tpl->Set('DATUM', $datum);
$this->app->Tpl->Set('PREISEINEURO', $preiseineuro==1?"checked":"");
$this->app->Tpl->Set('GRUPPIERENLAGER', $gruppierenlager==1?"checked":"");
$this->app->Tpl->Set(strtoupper($preisart), 'selected');
$this->app->erp->MenuEintrag('index.php?module=lager&action=list','zur&uuml;ck zur &Uuml;bersicht');
$this->app->erp->Headlines('','Bestand');
$this->app->YUI->TableSearch('TAB1', 'lager_wert', 'show','','',basename(__FILE__), __CLASS__);
$this->app->Tpl->Parse('PAGE','lager_wert.tpl');
}
public function LagerBuchenZwischenlagerDelete()
{
$id = $this->app->Secure->GetGET('id');

View File

@ -744,7 +744,22 @@ class Ticket {
$sql = "INSERT INTO `ticket_nachricht` (
`ticket`, `zeit`, `text`, `betreff`, `medium`, `versendet`,
`verfasser`, `mail`,`status`, `verfasser_replyto`, `mail_replyto`,`mail_cc`
) VALUES ('".$ticket_from_db['schluessel']."',NOW(),'".$anschreiben."','".$betreff."','email','1','".$senderName."','".$to."','neu','".$senderName."','".$senderAddress."','".$cc."');";
) VALUES ('".
$ticket_from_db['schluessel'].
"',NOW(),'".
$this->app->DB->real_escape_string($anschreiben).
"','".
$this->app->DB->real_escape_string($betreff).
"','email','1','".
$this->app->DB->real_escape_string($senderName).
"','".
$this->app->DB->real_escape_string($to).
"','neu','".
$this->app->DB->real_escape_string($senderName).
"','".
$this->app->DB->real_escape_string($senderAddress).
"','".
$this->app->DB->real_escape_string($cc)."');";
$this->app->DB->Insert($sql);
// Show new message dialog
@ -825,7 +840,7 @@ class Ticket {
) {
// Update message in ticket_nachricht
$sql = "UPDATE `ticket_nachricht` SET `zeitausgang` = NOW(), `betreff` = '".$drafted_messages[0]['betreff']."', `verfasser` = '$senderName', `verfasser_replyto` = '$senderName', `mail_replyto` = '$senderAddress' WHERE id = ".$drafted_messages[0]['id'];
$sql = "UPDATE `ticket_nachricht` SET `zeitausgang` = NOW(), `betreff` = '".$this->app->DB->real_escape_string($drafted_messages[0]['betreff'])."', `verfasser` = '$senderName', `verfasser_replyto` = '$senderName', `mail_replyto` = '$senderAddress' WHERE id = ".$drafted_messages[0]['id'];
$this->app->DB->Insert($sql);
$msg .= '<div class="info">Die E-Mail wurde erfolgreich versendet an '.$input['email_an'].'.';