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             if ($this->
getConfig()->isUtf() && function_exists(
'idn_to_ascii') ) {
 
 1575                 $sAddress = idn_to_ascii($sAddress);
 
 1578             parent::AddAddress($sAddress, $sName);
 
 1581             $this->_aRecipients[] = array($sAddress, $sName);
 
 1603         $this->_aRecipients = array();
 
 1619             $sEmail = $this->
_getShop()->oxshops__oxorderemail->value;
 
 1622         $this->_aReplies[] = array($sEmail, $sName);
 
 1625             parent::addReplyTo($sEmail, $sName);
 
 1645         $this->_aReplies = array();
 
 1655     public function setFrom($sFromAddress, $sFromName = null)
 
 1660         $sFromAddress = substr($sFromAddress, 0, 150);
 
 1661         $sFromName = substr($sFromName, 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;
 
 1776     public function addAttachment($sAttPath, $sAttFile = 
'', $sEncoding = 
'base64', $sType = 
'application/octet-stream')
 
 1778         $this->_aAttachments[] = array($sAttPath, $sAttFile, $sEncoding, $sType);
 
 1800     public function addEmbeddedImage($sFullPath, $sCid, $sAttFile = 
'', $sEncoding = 
'base64', $sType = 
'application/octet-stream')
 
 1802         $this->_aAttachments[] = array($sFullPath, basename($sFullPath), $sAttFile, $sEncoding, $sType, 
false, 
'inline', $sCid);
 
 1824         $this->_aAttachments = array();
 
 1840         if (stripos($sName, 
'X-') !== 
false) {
 
 1867         $sOwnerMessage = 
"Error sending eMail(" . $this->
getSubject() . 
") to: \n\n";
 
 1869         foreach ($aRecipients as $aEMail) {
 
 1870             $sOwnerMessage .= $aEMail[0];
 
 1871             $sOwnerMessage .= (!empty($aEMail[1])) ? 
' (' . $aEMail[1] . 
')' : 
'';
 
 1872             $sOwnerMessage .= 
" \n ";
 
 1874         $sOwnerMessage .= 
"\n\nError : " . $this->
getErrorInfo();
 
 1879         $blRet = @mail($oShop->oxshops__oxorderemail->value, 
"eMail problem in shop!", $sOwnerMessage);
 
 1950         $this->error_count = 0;
 
 1951         $this->ErrorInfo = 
'';
 
 1967         $this->
setFrom($oShop->oxshops__oxorderemail->value, $oShop->oxshops__oxname->getRawValue());
 
 1980     protected function _getShop($iLangId = null, $iShopId = null)
 
 1982         if ($iLangId === null && $iShopId === null) {
 
 1983             if (isset($this->_oShop)) {
 
 1986                 return $this->_oShop = $this->
getConfig()->getActiveShop();
 
 1992         $oShop = 
oxNew(
'oxShop');
 
 1993         if ($iShopId !== null) {
 
 1994             $oShop->setShopId($iShopId);
 
 1996         if ($iLangId !== null) {
 
 1997             $oShop->setLanguage($iLangId);
 
 2012         $this->
set(
"SMTPAuth", 
true);
 
 2013         $this->
set(
"Username", $sUserName);
 
 2014         $this->
set(
"Password", $sUserPassword);
 
 2024         $this->
set(
"SMTPDebug", $blDebug);
 
 2032         $this->
set(
"PluginDir", getShopBasePath() . 
"core/phpmailer/");
 
 2041         $oOutput = 
oxNew(
"oxOutput");
 
 2042         $this->
setBody($oOutput->process($this->getBody(), 
"oxemail"));
 
 2043         $this->
setAltBody($oOutput->process($this->getAltBody(), 
"oxemail"));
 
 2044         $oOutput->processEmail($this);
 
 2058             $oEx = 
oxNew(
"oxException");
 
 2059             $oEx->setMessage($oException->getMessage());
 
 2061             if ($this->
getConfig()->getConfigParam(
'iDebug') != 0) {
 
 2076         $oOutputProcessor = 
oxNew(
"oxOutput");
 
 2079         foreach ($this->_aViewData as $sKey => $sValue) {
 
 2080             $oSmarty->assign($sKey, $sValue);
 
 2084         $aNewSmartyArray = $oOutputProcessor->processViewArray($oSmarty->get_template_vars(), 
"oxemail");
 
 2086         foreach ($aNewSmartyArray as $key => $val) {
 
 2087             $oSmarty->assign($key, $val);
 
 2098         if (!$this->_sCharSet) {
 
 2101             return $this->CharSet;
 
 2122         $this->_oShop = $oShop;
 
 2132         return $this->
getConfig()->getActiveView()->getViewConfig();
 
 2142         return $this->
getConfig()->getActiveView();
 
 2154         return $oConfig->getActShopCurrencyObject();
 
 2165         $this->_aViewData[$sKey] = $sValue;
 
 2187         if (isset($this->_aViewData[$sKey])) {
 
 2199         $this->_aViewData[
"oUser"] = $oUser;
 
 2209         return $this->_aViewData[
"oUser"];
 
 2221         $oOrderList = 
oxNew(
'oxOrderFileList');
 
 2222         $oOrderList->loadOrderFiles($sOrderId);
 
 2224         if (count($oOrderList) > 0) {
 
 2240         return oxStr::getStr()->preg_replace(
'/(\?|&(amp;)?)(force_)?(admin_)?sid=[A-Z0-9\.]+/i', 
'\1shp=' . $this->
getConfig()->getShopId(), $sAltBody);