280 $this->setLanguage(
"en",
$myConfig->getConfigParam(
'sShopDir') .
"/core/phpmailer/language/");
298 if (defined(
'OXID_PHP_UNIT')) {
299 if (substr($sMethod, 0, 4) ==
"UNIT") {
300 $sMethod = str_replace(
"UNIT",
"_", $sMethod);
302 if (method_exists($this, $sMethod)) {
303 return call_user_func_array(array(& $this, $sMethod), $aArgs);
307 throw new oxSystemComponentException(
"Function '$sMethod' does not exist or is not accessible! (" . get_class($this) .
")" . PHP_EOL);
317 if ($this->_oConfig == null) {
321 return $this->_oConfig;
331 $this->_oConfig = $oConfig;
342 if ($this->_oSmarty === null) {
347 $this->_oSmarty->assign(
"oEmailView", $this);
418 if (
getStr()->preg_match(
'@^([0-9a-z]+://)?(.*)$@i', $sUrl, $aMatch)) {
420 if (($aMatch[1] ==
'ssl://') || ($aMatch[1] ==
'tls://')) {
421 $this->
set(
"SMTPSecure", substr($aMatch[1], 0, 3));
423 $sProtocol = $aMatch[1];
426 $sSmtpHost = $aMatch[2];
429 return $sProtocol . $sSmtpHost;
442 $oShop = ($oShop) ? $oShop : $this->
_getShop();
455 if ($oShop->oxshops__oxsmtpuser->value) {
456 $this->
_setSmtpAuthInfo($oShop->oxshops__oxsmtpuser->value, $oShop->oxshops__oxsmtppwd->value);
459 if (
$myConfig->getConfigParam(
'iDebug') == 6) {
477 if (
getStr()->preg_match(
'@^(.*?)(:([0-9]+))?$@i', $sSmtpHost, $aMatch)) {
478 $sSmtpHost = $aMatch[1];
479 $sSmtpPort = (int) $aMatch[3];
484 if ($blIsSmtp = (
bool) ($rHandle = @fsockopen($sSmtpHost, $sSmtpPort, $iErrNo, $sErrStr, 30))) {
512 $oUser = $oOrder->getOrderUser();
519 if (
$myConfig->getConfigParam(
"bl_perfLoadReviews")) {
526 $this->
setBody($oSmarty->fetch($this->_sOrderUserTemplate));
527 $this->
setAltBody($oSmarty->fetch($this->_sOrderUserPlainTemplate));
530 if ($sSubject === null) {
531 if ($oSmarty->template_exists($this->_sOrderUserSubjectTemplate)) {
532 $sSubject = $oSmarty->fetch($this->_sOrderUserSubjectTemplate);
534 $sSubject = $oShop->oxshops__oxordersubject->getRawValue() .
" (#" . $oOrder->oxorder__oxordernr->value .
")";
540 $sFullName = $oUser->oxuser__oxfname->getRawValue() .
" " . $oUser->oxuser__oxlname->getRawValue();
542 $this->
setRecipient($oUser->oxuser__oxusername->value, $sFullName);
543 $this->
setReplyTo($oShop->oxshops__oxorderemail->value, $oShop->oxshops__oxname->getRawValue());
545 $blSuccess = $this->
send();
571 $oUser = $oOrder->getOrderUser();
576 $this->
setFrom($oShop->oxshops__oxowneremail->value);
579 $iOrderLang = $oLang->getObjectTplLanguage();
583 if ($oShop->getLanguage() != $iOrderLang) {
584 $oShop = $this->
_getShop($iOrderLang);
596 $this->
setBody($oSmarty->fetch(
$myConfig->getTemplatePath($this->_sOrderOwnerTemplate,
false)));
597 $this->
setAltBody($oSmarty->fetch(
$myConfig->getTemplatePath($this->_sOrderOwnerPlainTemplate,
false)));
601 if ($sSubject === null) {
602 if ($oSmarty->template_exists($this->_sOrderOwnerSubjectTemplate)) {
603 $sSubject = $oSmarty->fetch($this->_sOrderOwnerSubjectTemplate);
605 $sSubject = $oShop->oxshops__oxordersubject->getRawValue() .
" (#" . $oOrder->oxorder__oxordernr->value .
")";
610 $this->
setRecipient($oShop->oxshops__oxowneremail->value, $oLang->translateString(
"order"));
612 if ($oUser->oxuser__oxusername->value !=
"admin") {
613 $sFullName = $oUser->oxuser__oxfname->getRawValue() .
" " . $oUser->oxuser__oxlname->getRawValue();
614 $this->
setReplyTo($oUser->oxuser__oxusername->value, $sFullName);
617 $blSuccess = $this->
send();
620 $oRemark =
oxNew(
"oxremark");
627 if (
$myConfig->getConfigParam(
'iDebug') == 6) {
647 $this->
setViewData(
"contentident",
"oxregisteraltemail");
648 $this->
setViewData(
"contentplainident",
"oxregisterplainaltemail");
681 $this->
setBody($oSmarty->fetch($this->_sRegisterTemplate));
682 $this->
setAltBody($oSmarty->fetch($this->_sRegisterTemplatePlain));
684 $this->
setSubject(($sSubject !== null) ? $sSubject : $oShop->oxshops__oxregistersubject->getRawValue());
686 $sFullName = $oUser->oxuser__oxfname->getRawValue() .
" " . $oUser->oxuser__oxlname->getRawValue();
688 $this->
setRecipient($oUser->oxuser__oxusername->value, $sFullName);
689 $this->
setReplyTo($oShop->oxshops__oxorderemail->value, $oShop->oxshops__oxname->getRawValue());
691 return $this->
send();
718 $sWhere =
"oxuser.oxactive = 1 and oxuser.oxusername = " . $oDb->quote($sEmailAddress) .
" and oxuser.oxpassword != ''";
720 if (
$myConfig->getConfigParam(
'blMallUsers')) {
721 $sOrder =
"order by oxshopid = '" . $oShop->getId() .
"' desc";
723 $sWhere .=
" and oxshopid = '" . $oShop->getId() .
"'";
726 $sSelect =
"select oxid from oxuser where $sWhere $sOrder";
727 if (($sOxId = $oDb->getOne($sSelect))) {
729 $oUser =
oxNew(
'oxuser');
730 if ($oUser->load($sOxId)) {
738 $this->
setBody($oSmarty->fetch($this->_sForgotPwdTemplate));
740 $this->
setAltBody($oSmarty->fetch($this->_sForgotPwdTemplatePlain));
743 $this->
setSubject(($sSubject !== null) ? $sSubject : $oShop->oxshops__oxforgotpwdsubject->getRawValue());
745 $sFullName = $oUser->oxuser__oxfname->getRawValue() .
" " . $oUser->oxuser__oxlname->getRawValue();
748 $this->
setReplyTo($oShop->oxshops__oxorderemail->value, $oShop->oxshops__oxname->getRawValue());
750 if (!$this->
send()) {
771 public function sendContactMail($sEmailAddress = null, $sSubject = null, $sMessage = null)
783 $this->
setRecipient($oShop->oxshops__oxinfoemail->value,
"");
784 $this->
setFrom($oShop->oxshops__oxowneremail->value, $oShop->oxshops__oxname->getRawValue());
787 return $this->
send();
814 $sConfirmCode = md5($oUser->oxuser__oxusername->value . $oUser->oxuser__oxpasssalt->value);
821 $this->
setBody($oSmarty->fetch($this->_sNewsletterOptInTemplate));
822 $this->
setAltBody($oSmarty->fetch($this->_sNewsletterOptInTemplatePlain));
823 $this->
setSubject(($sSubject !== null) ? $sSubject :
oxRegistry::getLang()->translateString(
"NEWSLETTER") .
" " . $oShop->oxshops__oxname->getRawValue());
825 $sFullName = $oUser->oxuser__oxfname->getRawValue() .
" " . $oUser->oxuser__oxlname->getRawValue();
827 $this->
setRecipient($oUser->oxuser__oxusername->value, $sFullName);
828 $this->
setFrom($oShop->oxshops__oxinfoemail->value, $oShop->oxshops__oxname->getRawValue());
829 $this->
setReplyTo($oShop->oxshops__oxinfoemail->value, $oShop->oxshops__oxname->getRawValue());
831 return $this->
send();
845 $iActShopLang =
$myConfig->getActiveShop()->getLanguage();
847 $sUrl =
$myConfig->getShopHomeURL() .
'cl=newsletter&fnc=addme&uid=' . $sId;
848 $sUrl .=
'&lang=' . $iActShopLang;
849 $sUrl .= ($sConfirmCode) ?
'&confirm=' . $sConfirmCode :
"";
872 $sBody = $oNewsLetter->getHtmlText();
874 if (!empty($sBody)) {
876 $this->
setAltBody($oNewsLetter->getPlainText());
878 $this->isHtml(
false);
879 $this->
setBody($oNewsLetter->getPlainText());
882 $this->
setSubject(($sSubject !== null) ? $sSubject : $oNewsLetter->oxnewsletter__oxtitle->getRawValue());
884 $sFullName = $oUser->oxuser__oxfname->getRawValue() .
" " . $oUser->oxuser__oxlname->getRawValue();
885 $this->
setRecipient($oUser->oxuser__oxusername->value, $sFullName);
886 $this->
setReplyTo($oShop->oxshops__oxorderemail->value, $oShop->oxshops__oxname->getRawValue());
888 return $this->
send();
906 $iCurrLang =
$myConfig->getActiveShop()->getLanguage();
909 $oShop = $this->
_getShop($iCurrLang);
912 if ($oProduct->getLanguage() != $iCurrLang) {
913 $oProduct->setLanguage($iCurrLang);
914 $oProduct->load($oProduct->getId());
919 $this->
setFrom($oShop->oxshops__oxinfoemail->value);
927 $sArticleUrl = $oProduct->getLink();
930 if (
$myConfig->getActiveView()->isActive(
'Invitations') && $oActiveUser = $oShop->getUser()) {
931 $sArticleUrl =
oxRegistry::get(
"oxUtilsUrl")->appendParamSeparator($sArticleUrl);
932 $sArticleUrl .=
"su=" . $oActiveUser->getId();
940 $this->
setBody($oSmarty->fetch($this->_sSuggestTemplate));
941 $this->
setAltBody($oSmarty->fetch($this->_sSuggestTemplatePlain));
944 $this->
setRecipient($oParams->rec_email, $oParams->rec_name);
945 $this->
setReplyTo($oParams->send_email, $oParams->send_name);
947 return $this->
send();
963 $iCurrLang =
$myConfig->getActiveShop()->getLanguage();
966 $oShop = $this->
_getShop($iCurrLang);
969 $this->
setFrom($oParams->send_email, $oParams->send_name);
979 if (
$myConfig->getActiveView()->isActive(
'Invitations') && $oActiveUser = $oShop->getUser()) {
980 $sHomeUrl =
oxRegistry::get(
"oxUtilsUrl")->appendParamSeparator($sHomeUrl);
981 $sHomeUrl .=
"su=" . $oActiveUser->getId();
984 if (is_array($oParams->rec_email) && count($oParams->rec_email) > 0) {
985 foreach ($oParams->rec_email as $sEmail) {
986 if (!empty($sEmail)) {
987 $sRegisterUrl =
oxRegistry::get(
"oxUtilsUrl")->appendParamSeparator($sHomeUrl);
989 $sRegisterUrl .=
"re=" . md5($sEmail);
995 $this->
setBody($oSmarty->fetch($this->_sInviteTemplate));
997 $this->
setAltBody($oSmarty->fetch($this->_sInviteTemplatePlain));
1001 $this->
setReplyTo($oParams->send_email, $oParams->send_name);
1026 $iOrderLang = (int) (isset($oOrder->oxorder__oxlang->value) ? $oOrder->oxorder__oxlang->value : 0);
1029 $oShop = $this->
_getShop($iOrderLang);
1040 if (
$myConfig->getConfigParam(
"bl_perfLoadReviews")) {
1042 $oUser =
oxNew(
'oxuser');
1043 $this->
setViewData(
"reviewuserhash", $oUser->getReviewUserHash($oOrder->oxorder__oxuserid->value));
1050 $aStore[
'INCLUDE_ANY'] = $oSmarty->security_settings[
'INCLUDE_ANY'];
1052 $iOldTplLang = $oLang->getTplLanguage();
1053 $iOldBaseLang = $oLang->getTplLanguage();
1054 $oLang->setTplLanguage($iOrderLang);
1055 $oLang->setBaseLanguage($iOrderLang);
1057 $oSmarty->security_settings[
'INCLUDE_ANY'] =
true;
1060 $this->
setBody($oSmarty->fetch($this->_sSenedNowTemplate));
1061 $this->
setAltBody($oSmarty->fetch($this->_sSenedNowTemplatePlain));
1063 $oLang->setTplLanguage($iOldTplLang);
1064 $oLang->setBaseLanguage($iOldBaseLang);
1066 $oSmarty->security_settings[
'INCLUDE_ANY'] = $aStore[
'INCLUDE_ANY'];
1069 $this->
setSubject(($sSubject !== null) ? $sSubject : $oShop->oxshops__oxsendednowsubject->getRawValue());
1071 $sFullName = $oOrder->oxorder__oxbillfname->getRawValue() .
" " . $oOrder->oxorder__oxbilllname->getRawValue();
1073 $this->
setRecipient($oOrder->oxorder__oxbillemail->value, $sFullName);
1074 $this->
setReplyTo($oShop->oxshops__oxorderemail->value, $oShop->oxshops__oxname->getRawValue());
1076 return $this->
send();
1092 $iOrderLang = (int) (isset($oOrder->oxorder__oxlang->value) ? $oOrder->oxorder__oxlang->value : 0);
1095 $oShop = $this->
_getShop($iOrderLang);
1106 $oUser =
oxNew(
'oxuser');
1107 $this->
setViewData(
"reviewuserhash", $oUser->getReviewUserHash($oOrder->oxorder__oxuserid->value));
1113 $aStore[
'INCLUDE_ANY'] = $oSmarty->security_settings[
'INCLUDE_ANY'];
1115 $iOldTplLang = $oLang->getTplLanguage();
1116 $iOldBaseLang = $oLang->getTplLanguage();
1117 $oLang->setTplLanguage($iOrderLang);
1118 $oLang->setBaseLanguage($iOrderLang);
1120 $oSmarty->security_settings[
'INCLUDE_ANY'] =
true;
1123 $this->
setBody($oSmarty->fetch($this->_sSendDownloadsTemplate));
1124 $this->
setAltBody($oSmarty->fetch($this->_sSendDownloadsTemplatePlain));
1126 $oLang->setTplLanguage($iOldTplLang);
1127 $oLang->setBaseLanguage($iOldBaseLang);
1129 $oSmarty->security_settings[
'INCLUDE_ANY'] = $aStore[
'INCLUDE_ANY'];
1132 $this->
setSubject(($sSubject !== null) ? $sSubject : $oLang->translateString(
"DOWNLOAD_LINKS", null,
false));
1134 $sFullName = $oOrder->oxorder__oxbillfname->getRawValue() .
" " . $oOrder->oxorder__oxbilllname->getRawValue();
1136 $this->
setRecipient($oOrder->oxorder__oxbillemail->value, $sFullName);
1137 $this->
setReplyTo($oShop->oxshops__oxorderemail->value, $oShop->oxshops__oxname->getRawValue());
1139 return $this->
send();
1156 public function sendBackupMail($aAttFiles, $sAttPath, $sEmailAddress, $sSubject, $sMessage, &$aStatus, &$aError)
1167 $this->
setRecipient($oShop->oxshops__oxinfoemail->value,
"");
1168 $sEmailAddress = $sEmailAddress ? $sEmailAddress : $oShop->oxshops__oxowneremail->value;
1170 $this->
setFrom($sEmailAddress,
"");
1174 $blAttashSucc =
true;
1176 foreach ($aAttFiles as $iNum => $sAttFile) {
1177 $sFullPath = $sAttPath . $sAttFile;
1178 if (@is_readable($sFullPath) && @is_file($sFullPath)) {
1179 $blAttashSucc = $this->
addAttachment($sFullPath, $sAttFile);
1181 $blAttashSucc =
false;
1182 $aError[] = array(5, $sAttFile);
1186 if (!$blAttashSucc) {
1187 $aError[] = array(4,
"");
1194 $blSend = $this->
send();
1215 if (is_array($sTo)) {
1216 foreach ($sTo as $sAddress) {
1226 $this->isHtml(
false);
1231 return $this->
send();
1246 $oArticleList =
oxNew(
"oxarticlelist");
1247 $oArticleList->loadStockRemindProducts($aBasketContents);
1250 if ($oArticleList->count()) {
1263 $this->
setRecipient($oShop->oxshops__oxowneremail->value, $oShop->oxshops__oxname->getRawValue());
1264 $this->
setFrom($oShop->oxshops__oxowneremail->value, $oShop->oxshops__oxname->getRawValue());
1265 $this->
setBody($oSmarty->fetch($this->getConfig()->getTemplatePath($this->_sReminderMailTemplate,
false)));
1267 $this->
setSubject(($sSubject !== null) ? $sSubject : $oLang->translateString(
'STOCK_LOW'));
1269 $blSend = $this->
send();
1293 $this->
setFrom($oParams->send_email, $oParams->send_name);
1303 $this->
setBody($oSmarty->fetch($this->_sWishListTemplate));
1304 $this->
setAltBody($oSmarty->fetch($this->_sWishListTemplatePlain));
1307 $this->
setRecipient($oParams->rec_email, $oParams->rec_name);
1308 $this->
setReplyTo($oParams->send_email, $oParams->send_name);
1310 return $this->
send();
1331 $iAlarmLang = $oAlarm->oxpricealarm__oxlang->value;
1333 $oArticle =
oxNew(
"oxarticle");
1335 $oArticle->loadInLang($iAlarmLang, $aParams[
'aid']);
1342 $this->
setViewData(
"bidprice", $oLang->formatCurrency($oAlarm->oxpricealarm__oxprice->value, $oCur));
1347 $this->
setRecipient($oShop->oxshops__oxorderemail->value, $oShop->oxshops__oxname->getRawValue());
1348 $this->
setSubject(($sSubject !== null) ? $sSubject : $oLang->translateString(
'PRICE_ALERT_FOR_PRODUCT', $iAlarmLang) .
" " . $oArticle->oxarticles__oxtitle->getRawValue());
1349 $this->
setBody($oSmarty->fetch($this->_sOwnerPricealarmTemplate));
1350 $this->
setFrom($aParams[
'email'],
"");
1353 return $this->
send();
1373 if ($oShop->getId() != $oAlarm->oxpricealarm__oxshopid->value) {
1374 $oShop =
oxNew(
"oxshop");
1375 $oShop->load($oAlarm->oxpricealarm__oxshopid->value);
1385 $this->
setViewData(
"product", $oAlarm->getArticle());
1387 $this->
setViewData(
"bidprice", $oAlarm->getFProposedPrice());
1388 $this->
setViewData(
"currency", $oAlarm->getPriceAlarmCurrency());
1394 $this->
setSubject($oShop->oxshops__oxname->value);
1396 if ($sBody === null) {
1397 $sBody = $oSmarty->fetch($this->_sPricealamrCustomerTemplate);
1402 $this->addAddress($sRecipient, $sRecipient);
1403 $this->
setReplyTo($oShop->oxshops__oxorderemail->value, $oShop->oxshops__oxname->getRawValue());
1405 if ($sReturnMailBody) {
1408 return $this->
send();
1421 protected function _includeImages($sImageDir = null, $sImageDirNoSSL = null, $sDynImageDir = null, $sAbsImageDir = null, $sAbsDynImageDir = null)
1424 if (preg_match_all(
'/<\s*img\s+[^>]*?src[\s]*=[\s]*[\'"]?([^[\'">]]+|.*?)?[\'">]/i', $sBody, $matches, PREG_SET_ORDER)) {
1427 $blReSetBody =
false;
1430 $sDynImageDir = $oFileUtils->normalizeDir($sDynImageDir);
1431 $sImageDir = $oFileUtils->normalizeDir($sImageDir);
1432 $sImageDirNoSSL = $oFileUtils->normalizeDir($sImageDirNoSSL);
1434 if (is_array($matches) && count($matches)) {
1435 $aImageCache = array();
1438 $oImgGenerator =
oxNew(
"oxDynImgGenerator");
1440 foreach ($matches as $aImage) {
1442 $image = $aImage[1];
1444 if (strpos($image, $sDynImageDir) === 0) {
1445 $sFileName = $oFileUtils->normalizeDir($sAbsDynImageDir) . str_replace($sDynImageDir,
'', $image);
1446 } elseif (strpos($image, $sImageDir) === 0) {
1447 $sFileName = $oFileUtils->normalizeDir($sAbsImageDir) . str_replace($sImageDir,
'', $image);
1448 } elseif (strpos($image, $sImageDirNoSSL) === 0) {
1449 $sFileName = $oFileUtils->normalizeDir($sAbsImageDir) . str_replace($sImageDirNoSSL,
'', $image);
1452 if ($sFileName && !@is_readable($sFileName)) {
1453 $sFileName = $oImgGenerator->getImagePath($sFileName);
1458 if (isset($aImageCache[$sFileName]) && $aImageCache[$sFileName]) {
1459 $sCId = $aImageCache[$sFileName];
1461 $sCId = $myUtilsObject->generateUID();
1462 $sMIME = $myUtils->oxMimeContentType($sFileName);
1463 if ($sMIME ==
'image/jpeg' || $sMIME ==
'image/gif' || $sMIME ==
'image/png') {
1464 if ($this->
addEmbeddedImage($sFileName, $sCId,
"image",
"base64", $sMIME)) {
1465 $aImageCache[$sFileName] = $sCId;
1471 if ($sCId && $sCId == $aImageCache[$sFileName]) {
1472 if ($sReplTag = str_replace($image,
'cid:' . $sCId, $aImage[0])) {
1473 $sBody = str_replace($aImage[0], $sReplTag, $sBody);
1474 $blReSetBody =
true;
1495 $sSubject = str_replace(array(
'&',
'"',
''',
'<',
'>'), array(
'&',
'"',
"'",
'<',
'>'), $sSubject);
1497 $this->
set(
"Subject", $sSubject);
1507 return $this->Subject;
1517 public function setBody($sBody = null, $blClearSid =
true)
1523 $this->
set(
"Body", $sBody);
1550 $sAltBody = str_replace(array(
'&',
'"',
''',
'<',
'>'), array(
'&',
'"',
"'",
'<',
'>'), $sAltBody);
1552 $this->
set(
"AltBody", $sAltBody);
1562 return $this->AltBody;
1574 parent::AddAddress($sAddress, $sName);
1577 $this->_aRecipients[] = array($sAddress, $sName);
1599 $this->_aRecipients = array();
1615 $sEmail = $this->
_getShop()->oxshops__oxorderemail->value;
1618 $this->_aReplies[] = array($sEmail, $sName);
1621 parent::addReplyTo($sEmail, $sName);
1641 $this->_aReplies = array();
1651 public function setFrom($sFromAddress, $sFromName = null)
1656 $sFromAddress = substr($sFromAddress, 0, 150);
1657 $sFromName = substr($sFromName, 0, 150);
1682 return $this->FromName;
1694 $this->_sCharSet = $sCharSet;
1708 $this->
set(
"Mailer", $sMailer);
1718 return $this->Mailer;
1728 $this->
set(
"Host", $sHost);
1738 return $this->ErrorInfo;
1749 $this->
set(
"WordWrap", $iWordWrap);
1759 $this->_blInlineImgEmail = $blUseImages;
1772 public function addAttachment($sAttPath, $sAttFile =
'', $sEncoding =
'base64', $sType =
'application/octet-stream')
1774 $this->_aAttachments[] = array($sAttPath, $sAttFile, $sEncoding, $sType);
1796 public function addEmbeddedImage($sFullPath, $sCid, $sAttFile =
'', $sEncoding =
'base64', $sType =
'application/octet-stream')
1798 $this->_aAttachments[] = array($sFullPath, basename($sFullPath), $sAttFile, $sEncoding, $sType,
false,
'inline', $sCid);
1820 $this->_aAttachments = array();
1836 if (stripos($sName,
'X-') !==
false) {
1863 $sOwnerMessage =
"Error sending eMail(" . $this->
getSubject() .
") to: \n\n";
1865 foreach ($aRecipients as $aEMail) {
1866 $sOwnerMessage .= $aEMail[0];
1867 $sOwnerMessage .= (!empty($aEMail[1])) ?
' (' . $aEMail[1] .
')' :
'';
1868 $sOwnerMessage .=
" \n ";
1870 $sOwnerMessage .=
"\n\nError : " . $this->
getErrorInfo();
1875 $blRet = @mail($oShop->oxshops__oxorderemail->value,
"eMail problem in shop!", $sOwnerMessage);
1946 $this->error_count = 0;
1947 $this->ErrorInfo =
'';
1963 $this->
setFrom($oShop->oxshops__oxorderemail->value, $oShop->oxshops__oxname->getRawValue());
1976 protected function _getShop($iLangId = null, $iShopId = null)
1978 if ($iLangId === null && $iShopId === null) {
1979 if (isset($this->_oShop)) {
1982 return $this->_oShop = $this->
getConfig()->getActiveShop();
1988 $oShop =
oxNew(
'oxShop');
1989 if ($iShopId !== null) {
1990 $oShop->setShopId($iShopId);
1992 if ($iLangId !== null) {
1993 $oShop->setLanguage($iLangId);
2008 $this->
set(
"SMTPAuth",
true);
2009 $this->
set(
"Username", $sUserName);
2010 $this->
set(
"Password", $sUserPassword);
2020 $this->
set(
"SMTPDebug", $blDebug);
2028 $this->
set(
"PluginDir", getShopBasePath() .
"core/phpmailer/");
2037 $oOutput =
oxNew(
"oxOutput");
2038 $this->
setBody($oOutput->process($this->getBody(),
"oxemail"));
2039 $this->
setAltBody($oOutput->process($this->getAltBody(),
"oxemail"));
2040 $oOutput->processEmail($this);
2054 $oEx =
oxNew(
"oxException");
2055 $oEx->setMessage($oException->getMessage());
2057 if ($this->
getConfig()->getConfigParam(
'iDebug') != 0) {
2072 $oOutputProcessor =
oxNew(
"oxOutput");
2075 foreach ($this->_aViewData as $sKey => $sValue) {
2076 $oSmarty->assign($sKey, $sValue);
2080 $aNewSmartyArray = $oOutputProcessor->processViewArray($oSmarty->get_template_vars(),
"oxemail");
2082 foreach ($aNewSmartyArray as $key => $val) {
2083 $oSmarty->assign($key, $val);
2094 if (!$this->_sCharSet) {
2097 return $this->CharSet;
2118 $this->_oShop = $oShop;
2128 return $this->
getConfig()->getActiveView()->getViewConfig();
2138 return $this->
getConfig()->getActiveView();
2150 return $oConfig->getActShopCurrencyObject();
2161 $this->_aViewData[$sKey] = $sValue;
2183 if (isset($this->_aViewData[$sKey])) {
2195 $this->_aViewData[
"oUser"] = $oUser;
2205 return $this->_aViewData[
"oUser"];
2217 $oOrderList =
oxNew(
'oxOrderFileList');
2218 $oOrderList->loadOrderFiles($sOrderId);
2220 if (count($oOrderList) > 0) {
2236 return oxStr::getStr()->preg_replace(
'/(\?|&(amp;)?)(force_)?(admin_)?sid=[A-Z0-9\.]+/i',
'\1shp=' . $this->
getConfig()->getShopId(), $sAltBody);