\n"; endif; /* $headers .= "MIME-Version: 1.0\n"; $headers .= "Content-type: text/plain; charset=iso-8859-1\n"; $headers .= "X-Priority: 1\n"; $headers .= "X-MSMail-Priority: High\n"; $headers .= "X-Mailer: php\n"; */ // if ($cc != "") : $headers .= "Cc: ".$cc."\n"; endif; if ($bcc != "") : $headers .= "Bcc: ".$bcc."\n"; endif; if ($wrapWord != "" && is_numeric($wrapWord)) $msgBody = wordwrap($msgBody, $wrapWord); $ret = mail($to, $subject, $msgBody, $headers); endif; endif; return $ret; } function prepareSendMailPear ($smtpServer, $user, $password, $to, $subject, $fromName, $fromEmail, $msgBody = "", $contentType = "", $wrapWord = "", $cc = "", $bcc = "") { global $mail_object; if ($wrapWord != "" && is_numeric($wrapWord)) $msgBody = wordwrap($msgBody, $wrapWord); $headers["From"] = $fromEmail; $headers["To"] = $to; $headers["Subject"] = $subject; if ($contentType != "") : if ($contentType == "html") : $contentType = "text/html; charset=iso-8859-1\n"; endif; $headers["Content-type"] = $contentType; endif; $params["host"] = $smtpServer; $params["port"] = "25"; $params["auth"] = true; $params["username"] = $user; $params["password"] = $password; return array($params, $to, $headers, $msgBody); } // Triggers the script for sending an external mail function sendExternalMailExtended ($mailContent, $mailSubject, $mailTo, $mailFrom = "EMPTY", $mailCc = "EMPTY", $mailBcc = "EMPTY", $mailLog = "EMPTY") { global $hq_id, $currentHqId, $debug; if ($mailContent != "" && $mailSubject != "" && $mailTo != "") : $path = getAbsoluteSystemPath(); if (!isset($currentHqId) || $currentHqId == "0") : $currentHqId = $hq_id; endif; if ($debug) : echo "path = " . $path . "
"; echo "currentHqId = " . $currentHqId . "
"; echo "mailSubject = " . $mailSubject . "
"; echo "mailTo = " . $mailTo . "
"; echo "mailFrom = " . $mailFrom . "
"; echo "mailCc = " . $mailCc . "
"; echo "mailBcc = " . $mailBcc . "
"; echo "mailLog = " . $mailLog . "
"; echo "mailContent = " . $mailContent . "
"; // die(); endif; // BEGIN mail text $mailCssFontType = getParameterValue("0", "MAIL_CSS_FONT_TYPE", $hq_id); if ($mailCssFontType == "") : $mailCssFontType = "Verdana, Arial, Helvetica, sans-serif"; endif; $mailtext = ""; $mailtext .= ""; $mailtext .= "

"; $mailCssFontClass = getParameterValue("0", "MAIL_CSS_FONT_CLASS", $currentHqId); if ($mailCssFontClass == "") : $mailCssFontClass = "f8bp1"; endif; $mailPreSalutationText = getParameterValue("0", "MAIL_PRE_SALUTATION_TEXT", $currentHqId); if ($mailPreSalutationText == "") : $mailPreSalutationText = getLngt("Sehr geehrte Damen und Herren,"); endif; $mailtext .= "
" . $mailPreSalutationText . "
"; $mailtext .= "
"; $mailtext .= $mailContent; $mailtext .= "
"; // Signature $mailTextRegards = getParameterValue("0", "MAIL_TEXT_REGARDS", $currentHqId); if ($mailTextRegards == "") : $mailTextRegards = getLngt("Mit freundlichem Gruß,"); endif; $mailtext .= "
" . $mailTextRegards . "
"; if ($mailDisplayModeEmployeeData == "1" && $mailEmployeeData[0] != "" && $mailEmployeeData[1] != "") : $mailtext .= "
"; $mailtext .= "
" . $mailEmployeeData[0] . " " . $mailEmployeeData[1] . "
"; else : $mailSalutationText = getParameterValue("0", "MAIL_SALUTATION_TEXT", $currentHqId); $mailtext .= "
" . getLngt($mailSalutationText) . "
"; endif; $mailtext .= "
"; // HOMEPAGE $mailFooterWebPage = getParameterValue("0", "MAIL_FOOTER_WEB_PAGE", $currentHqId); // LOGO $logoName = getParameterValue("0", "IMG_LOGO_NAME", $currentHqId); $logoHeight = getParameterValue("0", "IMG_LOGO_HEIGHT", $currentHqId); $logoWidth = getParameterValue("0", "IMG_LOGO_WIDTH", $currentHqId); if ($logoName != "" && $logoHeight != "" && $logoWidth != "") : $mailtext .= "
"; if ($mailFooterWebPage != "") : $mailtext .= "
"; else : $mailtext .= "
"; endif; $mailtext .= "
"; endif; $mailFooterEnabled = getParameterValue("0", "MAIL_FOOTER_ENABLED", $currentHqId); if ($mailFooterEnabled == "1") : $mailFooterAddress = getParameterValue("0", "MAIL_FOOTER_ADDRESS", $currentHqId); if ($mailFooterAddress != "") : $mailtext .= ""; $mailtext .= $mailFooterAddress; $mailtext .= "
"; $mailtext .= "
"; endif; $mailFooterContact = getParameterValue("0", "MAIL_FOOTER_CONTACT", $currentHqId); if ($mailFooterContact != "") : if ($mailDisplayModeEmployeeData == "1" && ($mailEmployeeData[2] != "" || $mailEmployeeData[3] != "" || $mailEmployeeData[4] != "")) : $mailtext .= ""; if ($mailEmployeeData[2] != "") : $mailtext .= ""; endif; if ($mailEmployeeData[4] != "") : $mailtext .= ""; endif; if ($mailEmployeeData[3] != "") : $mailtext .= ""; endif; // $mailFooterWebPage = getParameterValue("0", "MAIL_FOOTER_WEB_PAGE", $currentHqId); if ($mailFooterWebPage != "") : // $mailtext .= ""; $mailtext .= ""; endif; $mailtext .= "
" . getLngt("Telefon") . ": " . $mailEmployeeData[2] . "
" . getLngt("Fax") . ": " . $mailEmployeeData[4] . "
" . getLngt("Email") . ": " . $mailEmployeeData[3] . "
" . $mailFooterWebPage . "
" . $mailFooterWebPage . "
"; else : $mailtext .= ""; $mailtext .= $mailFooterContact; $mailtext .= "
"; endif; $mailtext .= "
"; endif; $mailFooterImpressum = getParameterValue("0", "MAIL_FOOTER_IMPRESSUM", $currentHqId); if ($mailFooterImpressum != "") : $mailtext .= ""; $mailtext .= $mailFooterImpressum; $mailtext .= "
"; $mailtext .= "
"; endif; $mailFooterResponsibility = getParameterValue("0", "MAIL_FOOTER_RESPONSIBILITY", $currentHqId); if ($mailFooterResponsibility == "") : $mailFooterResponsibility = getParameterValue("0", "MAIL_FOOTER_RESPONSIBILITY", "0"); endif; if ($mailFooterResponsibility != "") : $mailtext .= "
" . $mailFooterResponsibility . "
"; // Extended text $mailFooterResponsibility2 = getParameterValue("0", "MAIL_FOOTER_RESPONSIBILITY_2", $currentHqId); if ($mailFooterResponsibility2 == "") : $mailFooterResponsibility2 = getParameterValue("0", "MAIL_FOOTER_RESPONSIBILITY_2", "0"); endif; if ($mailFooterResponsibility2 != "") : $mailtext .= "
" . $mailFooterResponsibility2 . "
"; $mailFooterResponsibility3 = getParameterValue("0", "MAIL_FOOTER_RESPONSIBILITY_3", $currentHqId); if ($mailFooterResponsibility3 == "") : $mailFooterResponsibility3 = getParameterValue("0", "MAIL_FOOTER_RESPONSIBILITY_3", "0"); endif; if ($mailFooterResponsibility3 != "") : $mailtext .= "
" . $mailFooterResponsibility3 . "
"; $mailFooterResponsibility4 = getParameterValue("0", "MAIL_FOOTER_RESPONSIBILITY_4", $currentHqId); if ($mailFooterResponsibility4 == "") : $mailFooterResponsibility4 = getParameterValue("0", "MAIL_FOOTER_RESPONSIBILITY_4", "0"); endif; if ($mailFooterResponsibility4 != "") : $mailtext .= "
" . $mailFooterResponsibility4 . "
"; $mailFooterResponsibility5 = getParameterValue("0", "MAIL_FOOTER_RESPONSIBILITY_5", $currentHqId); if ($mailFooterResponsibility5 == "") : $mailFooterResponsibility5 = getParameterValue("0", "MAIL_FOOTER_RESPONSIBILITY_5", "0"); endif; if ($mailFooterResponsibility5 != "") : $mailtext .= "
" . $mailFooterResponsibility5 . "
"; endif; endif; endif; $mailtext .= "
"; endif; endif; $mailFooterThinkGreen = getParameterValue("0", "MAIL_FOOTER_THINK_GREEN", $currentHqId); if ($mailFooterThinkGreen != "") : $mailtext .= $mailFooterThinkGreen; $mailtext .= "
"; endif; $mailtext .= "
"; endif; $mailtext .= ""; // END mail text include('../include/email/htmlMimeMail.php'); // Send mail to admin@assecutor.de $mailObj = new htmlMimeMail(); if ($mailFrom == "" || $mailFrom == "EMPTY") : $mailFrom = getParameterValue("0", "MAIL_SENDER_ADDRESS", $currentHqId); if ($mailFrom == "") : $mailFrom = "support@assecutor.de"; endif; endif; $mailObj->setFrom($mailFrom); if ($mailCc != "" && $mailCc != "EMPTY") : $mailObj->setCc($mailCc); endif; if ($mailBcc != "" && $mailBcc != "EMPTY") : $mailObj->setBcc($mailBcc); endif; $mailObj->setSubject($mailSubject); $mailObj->setHtml($mailtext, null, "./"); $mailResult = $mailObj->send(array($mailTo), 'smtp'); $mailObj = NULL; endif; return $mailResult; } ?>