281         $this->setLanguage(
"en", 
$myConfig->getConfigParam(
'sShopDir') . 
"/core/phpmailer/language/");
 
  299         if (defined(
'OXID_PHP_UNIT')) {
 
  300             if (substr($sMethod, 0, 4) == 
"UNIT") {
 
  301                 $sMethod = str_replace(
"UNIT", 
"_", $sMethod);
 
  303             if (method_exists($this, $sMethod)) {
 
  304                 return call_user_func_array(array(& $this, $sMethod), $aArgs);
 
  308         throw new oxSystemComponentException(
"Function '$sMethod' does not exist or is not accessible! (" . get_class($this) . 
")" . PHP_EOL);
 
  318         if ($this->_oConfig == null) {
 
  322         return $this->_oConfig;
 
  332         $this->_oConfig = $oConfig;
 
  343         if ($this->_oSmarty === null) {
 
  348         $this->_oSmarty->assign(
"oEmailView", $this);
 
  419         if (
getStr()->preg_match(
'@^([0-9a-z]+://)?(.*)$@i', $sUrl, $aMatch)) {
 
  421                 if (($aMatch[1] == 
'ssl://') || ($aMatch[1] == 
'tls://')) {
 
  422                     $this->
set(
"SMTPSecure", substr($aMatch[1], 0, 3));
 
  424                     $sProtocol = $aMatch[1];
 
  427             $sSmtpHost = $aMatch[2];
 
  430         return $sProtocol . $sSmtpHost;
 
  443         $oShop = ($oShop) ? $oShop : $this->
_getShop();
 
  456         if ($oShop->oxshops__oxsmtpuser->value) {
 
  457             $this->
_setSmtpAuthInfo($oShop->oxshops__oxsmtpuser->value, $oShop->oxshops__oxsmtppwd->value);
 
  460         if (
$myConfig->getConfigParam(
'iDebug') == 6) {
 
  478             if (
getStr()->preg_match(
'@^(.*?)(:([0-9]+))?$@i', $sSmtpHost, $aMatch)) {
 
  479                 $sSmtpHost = $aMatch[1];
 
  480                 $sSmtpPort = (int) $aMatch[3];
 
  485             if ($blIsSmtp = (
bool) ($rHandle = @fsockopen($sSmtpHost, $sSmtpPort, $iErrNo, $sErrStr, 30))) {
 
  513         $oUser = $oOrder->getOrderUser();
 
  520         if (
$myConfig->getConfigParam(
"bl_perfLoadReviews")) {
 
  527         $this->
setBody($oSmarty->fetch($this->_sOrderUserTemplate));
 
  528         $this->
setAltBody($oSmarty->fetch($this->_sOrderUserPlainTemplate));
 
  531         if ($sSubject === null) {
 
  532             if ($oSmarty->template_exists($this->_sOrderUserSubjectTemplate)) {
 
  533                 $sSubject = $oSmarty->fetch($this->_sOrderUserSubjectTemplate);
 
  535                 $sSubject = $oShop->oxshops__oxordersubject->getRawValue() . 
" (#" . $oOrder->oxorder__oxordernr->value . 
")";
 
  541         $sFullName = $oUser->oxuser__oxfname->getRawValue() . 
" " . $oUser->oxuser__oxlname->getRawValue();
 
  543         $this->
setRecipient($oUser->oxuser__oxusername->value, $sFullName);
 
  544         $this->
setReplyTo($oShop->oxshops__oxorderemail->value, $oShop->oxshops__oxname->getRawValue());
 
  546         $blSuccess = $this->
send();
 
  572         $oUser = $oOrder->getOrderUser();
 
  577         $this->
setFrom($oShop->oxshops__oxowneremail->value);
 
  580         $iOrderLang = $oLang->getObjectTplLanguage();
 
  584         if ($oShop->getLanguage() != $iOrderLang) {
 
  585             $oShop = $this->
_getShop($iOrderLang);
 
  597         $this->
setBody($oSmarty->fetch(
$myConfig->getTemplatePath($this->_sOrderOwnerTemplate, 
false)));
 
  598         $this->
setAltBody($oSmarty->fetch(
$myConfig->getTemplatePath($this->_sOrderOwnerPlainTemplate, 
false)));
 
  602         if ($sSubject === null) {
 
  603             if ($oSmarty->template_exists($this->_sOrderOwnerSubjectTemplate)) {
 
  604                 $sSubject = $oSmarty->fetch($this->_sOrderOwnerSubjectTemplate);
 
  606                 $sSubject = $oShop->oxshops__oxordersubject->getRawValue() . 
" (#" . $oOrder->oxorder__oxordernr->value . 
")";
 
  611         $this->
setRecipient($oShop->oxshops__oxowneremail->value, $oLang->translateString(
"order"));
 
  613         if ($oUser->oxuser__oxusername->value != 
"admin") {
 
  614             $sFullName = $oUser->oxuser__oxfname->getRawValue() . 
" " . $oUser->oxuser__oxlname->getRawValue();
 
  615             $this->
setReplyTo($oUser->oxuser__oxusername->value, $sFullName);
 
  618         $blSuccess = $this->
send();
 
  621         $oRemark = 
oxNew(
"oxremark");
 
  628         if (
$myConfig->getConfigParam(
'iDebug') == 6) {
 
  648         $this->
setViewData(
"contentident", 
"oxregisteraltemail");
 
  649         $this->
setViewData(
"contentplainident", 
"oxregisterplainaltemail");
 
  682         $this->
setBody($oSmarty->fetch($this->_sRegisterTemplate));
 
  683         $this->
setAltBody($oSmarty->fetch($this->_sRegisterTemplatePlain));
 
  685         $this->
setSubject(($sSubject !== null) ? $sSubject : $oShop->oxshops__oxregistersubject->getRawValue());
 
  687         $sFullName = $oUser->oxuser__oxfname->getRawValue() . 
" " . $oUser->oxuser__oxlname->getRawValue();
 
  689         $this->
setRecipient($oUser->oxuser__oxusername->value, $sFullName);
 
  690         $this->
setReplyTo($oShop->oxshops__oxorderemail->value, $oShop->oxshops__oxname->getRawValue());
 
  692         return $this->
send();
 
  719         $sWhere = 
"oxuser.oxactive = 1 and oxuser.oxusername = " . $oDb->quote($sEmailAddress) . 
" and oxuser.oxpassword != ''";
 
  721         if (
$myConfig->getConfigParam(
'blMallUsers')) {
 
  722             $sOrder = 
"order by oxshopid = '" . $oShop->getId() . 
"' desc";
 
  724             $sWhere .= 
" and oxshopid = '" . $oShop->getId() . 
"'";
 
  727         $sSelect = 
"select oxid from oxuser where $sWhere $sOrder";
 
  728         if (($sOxId = $oDb->getOne($sSelect))) {
 
  730             $oUser = 
oxNew(
'oxuser');
 
  731             if ($oUser->load($sOxId)) {
 
  739                 $this->
setBody($oSmarty->fetch($this->_sForgotPwdTemplate));
 
  741                 $this->
setAltBody($oSmarty->fetch($this->_sForgotPwdTemplatePlain));
 
  744                 $this->
setSubject(($sSubject !== null) ? $sSubject : $oShop->oxshops__oxforgotpwdsubject->getRawValue());
 
  746                 $sFullName = $oUser->oxuser__oxfname->getRawValue() . 
" " . $oUser->oxuser__oxlname->getRawValue();
 
  749                 $this->
setReplyTo($oShop->oxshops__oxorderemail->value, $oShop->oxshops__oxname->getRawValue());
 
  751                 if (!$this->
send()) {
 
  772     public function sendContactMail($sEmailAddress = null, $sSubject = null, $sMessage = null)
 
  784         $this->
setRecipient($oShop->oxshops__oxinfoemail->value, 
"");
 
  785         $this->
setFrom($oShop->oxshops__oxowneremail->value, $oShop->oxshops__oxname->getRawValue());
 
  788         return $this->
send();
 
  815         $sConfirmCode = md5($oUser->oxuser__oxusername->value . $oUser->oxuser__oxpasssalt->value);
 
  822         $this->
setBody($oSmarty->fetch($this->_sNewsletterOptInTemplate));
 
  823         $this->
setAltBody($oSmarty->fetch($this->_sNewsletterOptInTemplatePlain));
 
  824         $this->
setSubject(($sSubject !== null) ? $sSubject : 
oxRegistry::getLang()->translateString(
"NEWSLETTER") . 
" " . $oShop->oxshops__oxname->getRawValue());
 
  826         $sFullName = $oUser->oxuser__oxfname->getRawValue() . 
" " . $oUser->oxuser__oxlname->getRawValue();
 
  828         $this->
setRecipient($oUser->oxuser__oxusername->value, $sFullName);
 
  829         $this->
setFrom($oShop->oxshops__oxinfoemail->value, $oShop->oxshops__oxname->getRawValue());
 
  830         $this->
setReplyTo($oShop->oxshops__oxinfoemail->value, $oShop->oxshops__oxname->getRawValue());
 
  832         return $this->
send();
 
  846         $iActShopLang = 
$myConfig->getActiveShop()->getLanguage();
 
  848         $sUrl = 
$myConfig->getShopHomeURL() . 
'cl=newsletter&fnc=addme&uid=' . $sId;
 
  849         $sUrl .= 
'&lang=' . $iActShopLang;
 
  850         $sUrl .= ($sConfirmCode) ? 
'&confirm=' . $sConfirmCode : 
"";
 
  873         $sBody = $oNewsLetter->getHtmlText();
 
  875         if (!empty($sBody)) {
 
  877             $this->
setAltBody($oNewsLetter->getPlainText());
 
  879             $this->isHtml(
false);
 
  880             $this->
setBody($oNewsLetter->getPlainText());
 
  883         $this->
setSubject(($sSubject !== null) ? $sSubject : $oNewsLetter->oxnewsletter__oxtitle->getRawValue());
 
  885         $sFullName = $oUser->oxuser__oxfname->getRawValue() . 
" " . $oUser->oxuser__oxlname->getRawValue();
 
  886         $this->
setRecipient($oUser->oxuser__oxusername->value, $sFullName);
 
  887         $this->
setReplyTo($oShop->oxshops__oxorderemail->value, $oShop->oxshops__oxname->getRawValue());
 
  889         return $this->
send();
 
  907         $iCurrLang = 
$myConfig->getActiveShop()->getLanguage();
 
  910         $oShop = $this->
_getShop($iCurrLang);
 
  913         if ($oProduct->getLanguage() != $iCurrLang) {
 
  914             $oProduct->setLanguage($iCurrLang);
 
  915             $oProduct->load($oProduct->getId());
 
  920         $this->
setFrom($oShop->oxshops__oxinfoemail->value);
 
  928         $sArticleUrl = $oProduct->getLink();
 
  931         if (
$myConfig->getActiveView()->isActive(
'Invitations') && $oActiveUser = $oShop->getUser()) {
 
  932             $sArticleUrl = 
oxRegistry::get(
"oxUtilsUrl")->appendParamSeparator($sArticleUrl);
 
  933             $sArticleUrl .= 
"su=" . $oActiveUser->getId();
 
  941         $this->
setBody($oSmarty->fetch($this->_sSuggestTemplate));
 
  942         $this->
setAltBody($oSmarty->fetch($this->_sSuggestTemplatePlain));
 
  945         $this->
setRecipient($oParams->rec_email, $oParams->rec_name);
 
  946         $this->
setReplyTo($oParams->send_email, $oParams->send_name);
 
  948         return $this->
send();
 
  964         $iCurrLang = 
$myConfig->getActiveShop()->getLanguage();
 
  967         $oShop = $this->
_getShop($iCurrLang);
 
  970         $this->
setFrom($oParams->send_email, $oParams->send_name);
 
  980         if (
$myConfig->getActiveView()->isActive(
'Invitations') && $oActiveUser = $oShop->getUser()) {
 
  981             $sHomeUrl = 
oxRegistry::get(
"oxUtilsUrl")->appendParamSeparator($sHomeUrl);
 
  982             $sHomeUrl .= 
"su=" . $oActiveUser->getId();
 
  985         if (is_array($oParams->rec_email) && count($oParams->rec_email) > 0) {
 
  986             foreach ($oParams->rec_email as $sEmail) {
 
  987                 if (!empty($sEmail)) {
 
  988                     $sRegisterUrl = 
oxRegistry::get(
"oxUtilsUrl")->appendParamSeparator($sHomeUrl);
 
  990                     $sRegisterUrl .= 
"re=" . md5($sEmail);
 
  996                     $this->
setBody($oSmarty->fetch($this->_sInviteTemplate));
 
  998                     $this->
setAltBody($oSmarty->fetch($this->_sInviteTemplatePlain));
 
 1002                     $this->
setReplyTo($oParams->send_email, $oParams->send_name);
 
 1027         $iOrderLang = (int) (isset($oOrder->oxorder__oxlang->value) ? $oOrder->oxorder__oxlang->value : 0);
 
 1030         $oShop = $this->
_getShop($iOrderLang);
 
 1041         if (
$myConfig->getConfigParam(
"bl_perfLoadReviews")) {
 
 1043             $oUser = 
oxNew(
'oxuser');
 
 1044             $this->
setViewData(
"reviewuserhash", $oUser->getReviewUserHash($oOrder->oxorder__oxuserid->value));
 
 1051         $aStore[
'INCLUDE_ANY'] = $oSmarty->security_settings[
'INCLUDE_ANY'];
 
 1053         $iOldTplLang = $oLang->getTplLanguage();
 
 1054         $iOldBaseLang = $oLang->getTplLanguage();
 
 1055         $oLang->setTplLanguage($iOrderLang);
 
 1056         $oLang->setBaseLanguage($iOrderLang);
 
 1058         $oSmarty->security_settings[
'INCLUDE_ANY'] = 
true;
 
 1061         $this->
setBody($oSmarty->fetch($this->_sSenedNowTemplate));
 
 1062         $this->
setAltBody($oSmarty->fetch($this->_sSenedNowTemplatePlain));
 
 1064         $oLang->setTplLanguage($iOldTplLang);
 
 1065         $oLang->setBaseLanguage($iOldBaseLang);
 
 1067         $oSmarty->security_settings[
'INCLUDE_ANY'] = $aStore[
'INCLUDE_ANY'];
 
 1070         $this->
setSubject(($sSubject !== null) ? $sSubject : $oShop->oxshops__oxsendednowsubject->getRawValue());
 
 1072         $sFullName = $oOrder->oxorder__oxbillfname->getRawValue() . 
" " . $oOrder->oxorder__oxbilllname->getRawValue();
 
 1074         $this->
setRecipient($oOrder->oxorder__oxbillemail->value, $sFullName);
 
 1075         $this->
setReplyTo($oShop->oxshops__oxorderemail->value, $oShop->oxshops__oxname->getRawValue());
 
 1077         return $this->
send();
 
 1093         $iOrderLang = (int) (isset($oOrder->oxorder__oxlang->value) ? $oOrder->oxorder__oxlang->value : 0);
 
 1096         $oShop = $this->
_getShop($iOrderLang);
 
 1107         $oUser = 
oxNew(
'oxuser');
 
 1108         $this->
setViewData(
"reviewuserhash", $oUser->getReviewUserHash($oOrder->oxorder__oxuserid->value));
 
 1114         $aStore[
'INCLUDE_ANY'] = $oSmarty->security_settings[
'INCLUDE_ANY'];
 
 1116         $iOldTplLang = $oLang->getTplLanguage();
 
 1117         $iOldBaseLang = $oLang->getTplLanguage();
 
 1118         $oLang->setTplLanguage($iOrderLang);
 
 1119         $oLang->setBaseLanguage($iOrderLang);
 
 1121         $oSmarty->security_settings[
'INCLUDE_ANY'] = 
true;
 
 1124         $this->
setBody($oSmarty->fetch($this->_sSendDownloadsTemplate));
 
 1125         $this->
setAltBody($oSmarty->fetch($this->_sSendDownloadsTemplatePlain));
 
 1127         $oLang->setTplLanguage($iOldTplLang);
 
 1128         $oLang->setBaseLanguage($iOldBaseLang);
 
 1130         $oSmarty->security_settings[
'INCLUDE_ANY'] = $aStore[
'INCLUDE_ANY'];
 
 1133         $this->
setSubject(($sSubject !== null) ? $sSubject : $oLang->translateString(
"DOWNLOAD_LINKS", null, 
false));
 
 1135         $sFullName = $oOrder->oxorder__oxbillfname->getRawValue() . 
" " . $oOrder->oxorder__oxbilllname->getRawValue();
 
 1137         $this->
setRecipient($oOrder->oxorder__oxbillemail->value, $sFullName);
 
 1138         $this->
setReplyTo($oShop->oxshops__oxorderemail->value, $oShop->oxshops__oxname->getRawValue());
 
 1140         return $this->
send();
 
 1157     public function sendBackupMail($aAttFiles, $sAttPath, $sEmailAddress, $sSubject, $sMessage, &$aStatus, &$aError)
 
 1168         $this->
setRecipient($oShop->oxshops__oxinfoemail->value, 
"");
 
 1169         $sEmailAddress = $sEmailAddress ? $sEmailAddress : $oShop->oxshops__oxowneremail->value;
 
 1171         $this->
setFrom($sEmailAddress, 
"");
 
 1175         $blAttashSucc = 
true;
 
 1177         foreach ($aAttFiles as $iNum => $sAttFile) {
 
 1178             $sFullPath = $sAttPath . $sAttFile;
 
 1179             if (@is_readable($sFullPath) && @is_file($sFullPath)) {
 
 1180                 $blAttashSucc = $this->
addAttachment($sFullPath, $sAttFile);
 
 1182                 $blAttashSucc = 
false;
 
 1183                 $aError[] = array(5, $sAttFile); 
 
 1187         if (!$blAttashSucc) {
 
 1188             $aError[] = array(4, 
""); 
 
 1195         $blSend = $this->
send();
 
 1216         if (is_array($sTo)) {
 
 1217             foreach ($sTo as $sAddress) {
 
 1227         $this->isHtml(
false);
 
 1232         return $this->
send();
 
 1247         $oArticleList = 
oxNew(
"oxarticlelist");
 
 1248         $oArticleList->loadStockRemindProducts($aBasketContents);
 
 1251         if ($oArticleList->count()) {
 
 1264             $this->
setRecipient($oShop->oxshops__oxowneremail->value, $oShop->oxshops__oxname->getRawValue());
 
 1265             $this->
setFrom($oShop->oxshops__oxowneremail->value, $oShop->oxshops__oxname->getRawValue());
 
 1266             $this->
setBody($oSmarty->fetch($this->getConfig()->getTemplatePath($this->_sReminderMailTemplate, 
false)));
 
 1268             $this->
setSubject(($sSubject !== null) ? $sSubject : $oLang->translateString(
'STOCK_LOW'));
 
 1270             $blSend = $this->
send();
 
 1294         $this->
setFrom($oParams->send_email, $oParams->send_name);
 
 1304         $this->
setBody($oSmarty->fetch($this->_sWishListTemplate));
 
 1305         $this->
setAltBody($oSmarty->fetch($this->_sWishListTemplatePlain));
 
 1308         $this->
setRecipient($oParams->rec_email, $oParams->rec_name);
 
 1309         $this->
setReplyTo($oParams->send_email, $oParams->send_name);
 
 1311         return $this->
send();
 
 1332         $iAlarmLang = $oAlarm->oxpricealarm__oxlang->value;
 
 1334         $oArticle = 
oxNew(
"oxarticle");
 
 1336         $oArticle->loadInLang($iAlarmLang, $aParams[
'aid']);
 
 1343         $this->
setViewData(
"bidprice", $oLang->formatCurrency($oAlarm->oxpricealarm__oxprice->value, $oCur));
 
 1348         $this->
setRecipient($oShop->oxshops__oxorderemail->value, $oShop->oxshops__oxname->getRawValue());
 
 1349         $this->
setSubject(($sSubject !== null) ? $sSubject : $oLang->translateString(
'PRICE_ALERT_FOR_PRODUCT', $iAlarmLang) . 
" " . $oArticle->oxarticles__oxtitle->getRawValue());
 
 1350         $this->
setBody($oSmarty->fetch($this->_sOwnerPricealarmTemplate));
 
 1351         $this->
setFrom($aParams[
'email'], 
"");
 
 1354         return $this->
send();
 
 1374         if ($oShop->getId() != $oAlarm->oxpricealarm__oxshopid->value) {
 
 1375             $oShop = 
oxNew(
"oxshop");
 
 1376             $oShop->load($oAlarm->oxpricealarm__oxshopid->value);
 
 1386         $this->
setViewData(
"product", $oAlarm->getArticle());
 
 1388         $this->
setViewData(
"bidprice", $oAlarm->getFProposedPrice());
 
 1389         $this->
setViewData(
"currency", $oAlarm->getPriceAlarmCurrency());
 
 1395         $this->
setSubject($oShop->oxshops__oxname->value);
 
 1397         if ($sBody === null) {
 
 1398             $sBody = $oSmarty->fetch($this->_sPricealamrCustomerTemplate);
 
 1403         $this->addAddress($sRecipient, $sRecipient);
 
 1404         $this->
setReplyTo($oShop->oxshops__oxorderemail->value, $oShop->oxshops__oxname->getRawValue());
 
 1406         if ($sReturnMailBody) {
 
 1409             return $this->
send();
 
 1422     protected function _includeImages($sImageDir = null, $sImageDirNoSSL = null, $sDynImageDir = null, $sAbsImageDir = null, $sAbsDynImageDir = null)
 
 1425         if (preg_match_all(
'/<\s*img\s+[^>]*?src[\s]*=[\s]*[\'"]?([^[\'">]]+|.*?)?[\'">]/i', $sBody, $matches, PREG_SET_ORDER)) {
 
 1428             $blReSetBody = 
false;
 
 1431             $sDynImageDir = $oFileUtils->normalizeDir($sDynImageDir);
 
 1432             $sImageDir = $oFileUtils->normalizeDir($sImageDir);
 
 1433             $sImageDirNoSSL = $oFileUtils->normalizeDir($sImageDirNoSSL);
 
 1435             if (is_array($matches) && count($matches)) {
 
 1436                 $aImageCache = array();
 
 1439                 $oImgGenerator = 
oxNew(
"oxDynImgGenerator");
 
 1441                 foreach ($matches as $aImage) {
 
 1443                     $image = $aImage[1];
 
 1445                     if (strpos($image, $sDynImageDir) === 0) {
 
 1446                         $sFileName = $oFileUtils->normalizeDir($sAbsDynImageDir) . str_replace($sDynImageDir, 
'', $image);
 
 1447                     } elseif (strpos($image, $sImageDir) === 0) {
 
 1448                         $sFileName = $oFileUtils->normalizeDir($sAbsImageDir) . str_replace($sImageDir, 
'', $image);
 
 1449                     } elseif (strpos($image, $sImageDirNoSSL) === 0) {
 
 1450                         $sFileName = $oFileUtils->normalizeDir($sAbsImageDir) . str_replace($sImageDirNoSSL, 
'', $image);
 
 1453                     if ($sFileName && !@is_readable($sFileName)) {
 
 1454                         $sFileName = $oImgGenerator->getImagePath($sFileName);
 
 1459                         if (isset($aImageCache[$sFileName]) && $aImageCache[$sFileName]) {
 
 1460                             $sCId = $aImageCache[$sFileName];
 
 1462                             $sCId = $myUtilsObject->generateUID();
 
 1463                             $sMIME = $myUtils->oxMimeContentType($sFileName);
 
 1464                             if ($sMIME == 
'image/jpeg' || $sMIME == 
'image/gif' || $sMIME == 
'image/png') {
 
 1465                                 if ($this->
addEmbeddedImage($sFileName, $sCId, 
"image", 
"base64", $sMIME)) {
 
 1466                                     $aImageCache[$sFileName] = $sCId;
 
 1472                         if ($sCId && $sCId == $aImageCache[$sFileName]) {
 
 1473                             if ($sReplTag = str_replace($image, 
'cid:' . $sCId, $aImage[0])) {
 
 1474                                 $sBody = str_replace($aImage[0], $sReplTag, $sBody);
 
 1475                                 $blReSetBody = 
true;
 
 1496         $sSubject = str_replace(array(
'&', 
'"', 
''', 
'<', 
'>'), array(
'&', 
'"', 
"'", 
'<', 
'>'), $sSubject);
 
 1498         $this->
set(
"Subject", $sSubject);
 
 1508         return $this->Subject;
 
 1518     public function setBody($sBody = null, $blClearSid = 
true)
 
 1524         $this->
set(
"Body", $sBody);
 
 1551         $sAltBody = str_replace(array(
'&', 
'"', 
''', 
'<', 
'>'), array(
'&', 
'"', 
"'", 
'<', 
'>'), $sAltBody);
 
 1553         $this->
set(
"AltBody", $sAltBody);
 
 1563         return $this->AltBody;
 
 1575             if ($this->
getConfig()->isUtf() && function_exists(
'idn_to_ascii') ) {
 
 1576                 $sAddress = idn_to_ascii($sAddress);
 
 1579             parent::AddAddress($sAddress, $sName);
 
 1582             $this->_aRecipients[] = array($sAddress, $sName);
 
 1604         $this->_aRecipients = array();
 
 1620             $sEmail = $this->
_getShop()->oxshops__oxorderemail->value;
 
 1623         $this->_aReplies[] = array($sEmail, $sName);
 
 1626             parent::addReplyTo($sEmail, $sName);
 
 1646         $this->_aReplies = array();
 
 1655     public function setFrom($address, $name = null, $auto = 
true)
 
 1657         $address = substr($address, 0, 150);
 
 1658         $name = substr($name, 0, 150);
 
 1686         return $this->FromName;
 
 1698             $this->_sCharSet = $sCharSet;
 
 1712         $this->
set(
"Mailer", $sMailer);
 
 1722         return $this->Mailer;
 
 1732         $this->
set(
"Host", $sHost);
 
 1742         return $this->ErrorInfo;
 
 1753         $this->
set(
"WordWrap", $iWordWrap);
 
 1763         $this->_blInlineImgEmail = $blUseImages;
 
 1772         $encoding = 
'base64',
 
 1773         $type = 
'application/octet-stream',
 
 1774         $disposition = 
'attachment' 
 1776         $this->_aAttachments[] = array($path, $name, $encoding, $type, $disposition);
 
 1794         $encoding = 
'base64',
 
 1795         $type = 
'application/octet-stream',
 
 1796         $disposition = 
'inline' 
 1798         $this->_aAttachments[] = array(
 
 1829         $this->_aAttachments = array();
 
 1845         if (stripos($sName, 
'X-') !== 
false) {
 
 1872         $sOwnerMessage = 
"Error sending eMail(" . $this->
getSubject() . 
") to: \n\n";
 
 1874         foreach ($aRecipients as $aEMail) {
 
 1875             $sOwnerMessage .= $aEMail[0];
 
 1876             $sOwnerMessage .= (!empty($aEMail[1])) ? 
' (' . $aEMail[1] . 
')' : 
'';
 
 1877             $sOwnerMessage .= 
" \n ";
 
 1879         $sOwnerMessage .= 
"\n\nError : " . $this->
getErrorInfo();
 
 1884         $blRet = @mail($oShop->oxshops__oxorderemail->value, 
"eMail problem in shop!", $sOwnerMessage);
 
 1955         $this->error_count = 0;
 
 1956         $this->ErrorInfo = 
'';
 
 1972         $this->
setFrom($oShop->oxshops__oxorderemail->value, $oShop->oxshops__oxname->getRawValue());
 
 1985     protected function _getShop($iLangId = null, $iShopId = null)
 
 1987         if ($iLangId === null && $iShopId === null) {
 
 1988             if (isset($this->_oShop)) {
 
 1991                 return $this->_oShop = $this->
getConfig()->getActiveShop();
 
 1997         $oShop = 
oxNew(
'oxShop');
 
 1998         if ($iShopId !== null) {
 
 1999             $oShop->setShopId($iShopId);
 
 2001         if ($iLangId !== null) {
 
 2002             $oShop->setLanguage($iLangId);
 
 2017         $this->
set(
"SMTPAuth", 
true);
 
 2018         $this->
set(
"Username", $sUserName);
 
 2019         $this->
set(
"Password", $sUserPassword);
 
 2029         $this->
set(
"SMTPDebug", $blDebug);
 
 2037         $this->
set(
"PluginDir", getShopBasePath() . 
"core/phpmailer/");
 
 2046         $oOutput = 
oxNew(
"oxOutput");
 
 2047         $this->
setBody($oOutput->process($this->getBody(), 
"oxemail"));
 
 2048         $this->
setAltBody($oOutput->process($this->getAltBody(), 
"oxemail"));
 
 2049         $oOutput->processEmail($this);
 
 2063             $oEx = 
oxNew(
"oxException");
 
 2064             $oEx->setMessage($oException->getMessage());
 
 2066             if ($this->
getConfig()->getConfigParam(
'iDebug') != 0) {
 
 2081         $oOutputProcessor = 
oxNew(
"oxOutput");
 
 2084         foreach ($this->_aViewData as $sKey => $sValue) {
 
 2085             $oSmarty->assign($sKey, $sValue);
 
 2089         $aNewSmartyArray = $oOutputProcessor->processViewArray($oSmarty->get_template_vars(), 
"oxemail");
 
 2091         foreach ($aNewSmartyArray as $key => $val) {
 
 2092             $oSmarty->assign($key, $val);
 
 2103         if (!$this->_sCharSet) {
 
 2106             return $this->CharSet;
 
 2127         $this->_oShop = $oShop;
 
 2137         return $this->
getConfig()->getActiveView()->getViewConfig();
 
 2147         return $this->
getConfig()->getActiveView();
 
 2159         return $oConfig->getActShopCurrencyObject();
 
 2170         $this->_aViewData[$sKey] = $sValue;
 
 2192         if (isset($this->_aViewData[$sKey])) {
 
 2204         $this->_aViewData[
"oUser"] = $oUser;
 
 2214         return $this->_aViewData[
"oUser"];
 
 2226         $oOrderList = 
oxNew(
'oxOrderFileList');
 
 2227         $oOrderList->loadOrderFiles($sOrderId);
 
 2229         if (count($oOrderList) > 0) {
 
 2245         return oxStr::getStr()->preg_replace(
'/(\?|&(amp;)?)(force_)?(admin_)?sid=[A-Z0-9\.]+/i', 
'\1shp=' . $this->
getConfig()->getShopId(), $sAltBody);