278 $this->isHtml(
true );
279 $this->setLanguage(
"en",
$myConfig->getConfigParam(
'sShopDir' ).
"/core/phpmailer/language/");
295 public function __call( $sMethod, $aArgs )
297 if ( defined(
'OXID_PHP_UNIT' ) ) {
298 if ( substr( $sMethod, 0, 4) ==
"UNIT" ) {
299 $sMethod = str_replace(
"UNIT",
"_", $sMethod );
301 if ( method_exists( $this, $sMethod)) {
302 return call_user_func_array( array( & $this, $sMethod ), $aArgs );
306 throw new oxSystemComponentException(
"Function '$sMethod' does not exist or is not accessible! (" . get_class($this) .
")".PHP_EOL);
316 if ( $this->_oConfig == null ) {
320 return $this->_oConfig;
332 $this->_oConfig = $oConfig;
343 if ( $this->_oSmarty === null ) {
348 $this->_oSmarty->assign(
"oEmailView", $this );
417 if (
getStr()->preg_match(
'@^([0-9a-z]+://)?(.*)$@i', $sUrl, $aMatch ) ) {
419 if (($aMatch[1] ==
'ssl://') || ($aMatch[1] ==
'tls://')) {
420 $this->
set(
"SMTPSecure", substr($aMatch[1], 0, 3) );
422 $sProtocol = $aMatch[1];
425 $sSmtpHost = $aMatch[2];
428 return $sProtocol.$sSmtpHost;
441 $oShop = ( $oShop ) ? $oShop : $this->
_getShop();
453 if ( $oShop->oxshops__oxsmtpuser->value ) {
454 $this->
_setSmtpAuthInfo( $oShop->oxshops__oxsmtpuser->value, $oShop->oxshops__oxsmtppwd->value );
457 if (
$myConfig->getConfigParam(
'iDebug' ) == 6 ) {
475 if (
getStr()->preg_match(
'@^(.*?)(:([0-9]+))?$@i', $sSmtpHost, $aMatch)) {
476 $sSmtpHost = $aMatch[1];
477 $sSmtpPort = (int)$aMatch[3];
482 if ( $blIsSmtp = (
bool) ( $rHandle = @fsockopen( $sSmtpHost, $sSmtpPort, $iErrNo, $sErrStr, 30 )) ) {
510 $oUser = $oOrder->getOrderUser();
517 if (
$myConfig->getConfigParam(
"bl_perfLoadReviews" ) ) {
524 $this->
setBody( $oSmarty->fetch( $this->_sOrderUserTemplate ) );
525 $this->
setAltBody( $oSmarty->fetch( $this->_sOrderUserPlainTemplate ) );
528 if ( $sSubject === null ) {
529 if ( $oSmarty->template_exists( $this->_sOrderUserSubjectTemplate) ) {
530 $sSubject = $oSmarty->fetch( $this->_sOrderUserSubjectTemplate );
532 $sSubject = $oShop->oxshops__oxordersubject->getRawValue().
" (#".$oOrder->oxorder__oxordernr->value.
")";
538 $sFullName = $oUser->oxuser__oxfname->getRawValue() .
" " . $oUser->oxuser__oxlname->getRawValue();
540 $this->
setRecipient( $oUser->oxuser__oxusername->value, $sFullName );
541 $this->
setReplyTo( $oShop->oxshops__oxorderemail->value, $oShop->oxshops__oxname->getRawValue() );
543 $blSuccess = $this->
send();
569 $oUser = $oOrder->getOrderUser();
574 $this->
setFrom( $oShop->oxshops__oxowneremail->value );
577 $iOrderLang = $oLang->getObjectTplLanguage();
581 if ( $oShop->getLanguage() != $iOrderLang ) {
582 $oShop = $this->
_getShop( $iOrderLang );
594 $this->
setBody( $oSmarty->fetch(
$myConfig->getTemplatePath( $this->_sOrderOwnerTemplate,
false ) ) );
595 $this->
setAltBody( $oSmarty->fetch(
$myConfig->getTemplatePath( $this->_sOrderOwnerPlainTemplate,
false ) ) );
599 if ( $sSubject === null ) {
600 if ( $oSmarty->template_exists( $this->_sOrderOwnerSubjectTemplate) ) {
601 $sSubject = $oSmarty->fetch( $this->_sOrderOwnerSubjectTemplate );
603 $sSubject = $oShop->oxshops__oxordersubject->getRawValue().
" (#".$oOrder->oxorder__oxordernr->value.
")";
608 $this->
setRecipient( $oShop->oxshops__oxowneremail->value, $oLang->translateString(
"order") );
610 if ( $oUser->oxuser__oxusername->value !=
"admin" ) {
611 $sFullName = $oUser->oxuser__oxfname->getRawValue() .
" " . $oUser->oxuser__oxlname->getRawValue();
612 $this->
setReplyTo( $oUser->oxuser__oxusername->value, $sFullName );
615 $blSuccess = $this->
send();
618 $oRemark =
oxNew(
"oxremark" );
625 if (
$myConfig->getConfigParam(
'iDebug' ) == 6) {
645 $this->
setViewData(
"contentident",
"oxregisteraltemail" );
646 $this->
setViewData(
"contentplainident",
"oxregisterplainaltemail" );
679 $this->
setBody( $oSmarty->fetch( $this->_sRegisterTemplate ) );
680 $this->
setAltBody( $oSmarty->fetch( $this->_sRegisterTemplatePlain ) );
682 $this->
setSubject( ( $sSubject !== null ) ? $sSubject : $oShop->oxshops__oxregistersubject->getRawValue() );
684 $sFullName = $oUser->oxuser__oxfname->getRawValue() .
" " . $oUser->oxuser__oxlname->getRawValue();
686 $this->
setRecipient( $oUser->oxuser__oxusername->value, $sFullName );
687 $this->
setReplyTo( $oShop->oxshops__oxorderemail->value, $oShop->oxshops__oxname->getRawValue() );
689 return $this->
send();
716 $sWhere =
"oxuser.oxactive = 1 and oxuser.oxusername = ".$oDb->quote( $sEmailAddress ).
" and oxuser.oxpassword != ''";
718 if (
$myConfig->getConfigParam(
'blMallUsers' )) {
719 $sOrder =
"order by oxshopid = '".$oShop->getId().
"' desc";
721 $sWhere .=
" and oxshopid = '".$oShop->getId().
"'";
724 $sSelect =
"select oxid from oxuser where $sWhere $sOrder";
725 if ( ( $sOxId = $oDb->getOne( $sSelect ) ) ) {
727 $oUser =
oxNew(
'oxuser' );
728 if ( $oUser->load($sOxId) ) {
736 $this->
setBody( $oSmarty->fetch( $this->_sForgotPwdTemplate ) );
738 $this->
setAltBody( $oSmarty->fetch( $this->_sForgotPwdTemplatePlain ) );
741 $this->
setSubject( ( $sSubject !== null ) ? $sSubject : $oShop->oxshops__oxforgotpwdsubject->getRawValue() );
743 $sFullName = $oUser->oxuser__oxfname->getRawValue() .
" " . $oUser->oxuser__oxlname->getRawValue();
746 $this->
setReplyTo( $oShop->oxshops__oxorderemail->value, $oShop->oxshops__oxname->getRawValue() );
748 if ( !$this->
send() ) {
768 public function sendContactMail( $sEmailAddress = null, $sSubject = null, $sMessage = null )
780 $this->
setRecipient( $oShop->oxshops__oxinfoemail->value,
"" );
781 $this->
setFrom( $oShop->oxshops__oxowneremail->value, $oShop->oxshops__oxname->getRawValue() );
784 return $this->
send();
811 $sConfirmCode = md5($oUser->oxuser__oxusername->value.$oUser->oxuser__oxpasssalt->value);
818 $this->
setBody( $oSmarty->fetch( $this->_sNewsletterOptInTemplate ) );
819 $this->
setAltBody( $oSmarty->fetch( $this->_sNewsletterOptInTemplatePlain ) );
820 $this->
setSubject( ( $sSubject !== null ) ? $sSubject :
oxRegistry::getLang()->translateString(
"NEWSLETTER") .
" " . $oShop->oxshops__oxname->getRawValue() );
822 $sFullName = $oUser->oxuser__oxfname->getRawValue() .
" " . $oUser->oxuser__oxlname->getRawValue();
824 $this->
setRecipient( $oUser->oxuser__oxusername->value, $sFullName );
825 $this->
setFrom( $oShop->oxshops__oxinfoemail->value, $oShop->oxshops__oxname->getRawValue() );
826 $this->
setReplyTo( $oShop->oxshops__oxinfoemail->value, $oShop->oxshops__oxname->getRawValue() );
828 return $this->
send();
842 $iActShopLang =
$myConfig->getActiveShop()->getLanguage();
844 $sUrl =
$myConfig->getShopHomeURL().
'cl=newsletter&fnc=addme&uid='.$sId;
845 $sUrl.=
'&lang='.$iActShopLang;
846 $sUrl.= ( $sConfirmCode ) ?
'&confirm='.$sConfirmCode :
"";
868 $sBody = $oNewsLetter->getHtmlText();
870 if ( !empty($sBody) ) {
872 $this->
setAltBody( $oNewsLetter->getPlainText() );
874 $this->isHtml(
false );
875 $this->
setBody( $oNewsLetter->getPlainText() );
878 $this->
setSubject( ( $sSubject !== null ) ? $sSubject : $oNewsLetter->oxnewsletter__oxtitle->getRawValue() );
880 $sFullName = $oUser->oxuser__oxfname->getRawValue() .
" " . $oUser->oxuser__oxlname->getRawValue();
881 $this->
setRecipient( $oUser->oxuser__oxusername->value, $sFullName );
882 $this->
setReplyTo( $oShop->oxshops__oxorderemail->value, $oShop->oxshops__oxname->getRawValue() );
884 return $this->
send();
901 $iCurrLang =
$myConfig->getActiveShop()->getLanguage();
904 $oShop = $this->
_getShop( $iCurrLang );
907 if ( $oProduct->getLanguage() != $iCurrLang ) {
908 $oProduct->setLanguage( $iCurrLang );
909 $oProduct->load( $oProduct->getId() );
914 $this->
setFrom( $oShop->oxshops__oxinfoemail->value );
922 $sArticleUrl = $oProduct->getLink();
925 if (
$myConfig->getActiveView()->isActive(
'Invitations') && $oActiveUser = $oShop->getUser() ) {
926 $sArticleUrl =
oxRegistry::get(
"oxUtilsUrl")->appendParamSeparator( $sArticleUrl );
927 $sArticleUrl .=
"su=" . $oActiveUser->getId();
935 $this->
setBody( $oSmarty->fetch( $this->_sSuggestTemplate ) );
936 $this->
setAltBody( $oSmarty->fetch( $this->_sSuggestTemplatePlain ) );
939 $this->
setRecipient( $oParams->rec_email, $oParams->rec_name );
940 $this->
setReplyTo( $oParams->send_email, $oParams->send_name );
942 return $this->
send();
958 $iCurrLang =
$myConfig->getActiveShop()->getLanguage();
961 $oShop = $this->
_getShop( $iCurrLang );
964 $this->
setFrom( $oParams->send_email, $oParams->send_name );
974 if (
$myConfig->getActiveView()->isActive(
'Invitations') && $oActiveUser = $oShop->getUser() ) {
975 $sHomeUrl =
oxRegistry::get(
"oxUtilsUrl")->appendParamSeparator( $sHomeUrl );
976 $sHomeUrl .=
"su=" . $oActiveUser->getId();
979 if ( is_array($oParams->rec_email) && count($oParams->rec_email) > 0 ) {
980 foreach ( $oParams->rec_email as $sEmail ) {
981 if ( !empty( $sEmail ) ) {
982 $sRegisterUrl =
oxRegistry::get(
"oxUtilsUrl")->appendParamSeparator( $sHomeUrl );
984 $sRegisterUrl .=
"re=" . md5($sEmail);
990 $this->
setBody( $oSmarty->fetch( $this->_sInviteTemplate ) );
992 $this->
setAltBody( $oSmarty->fetch( $this->_sInviteTemplatePlain ) );
996 $this->
setReplyTo( $oParams->send_email, $oParams->send_name );
1020 $iOrderLang = (int) ( isset( $oOrder->oxorder__oxlang->value ) ? $oOrder->oxorder__oxlang->value : 0 );
1023 $oShop = $this->
_getShop( $iOrderLang );
1034 if (
$myConfig->getConfigParam(
"bl_perfLoadReviews" ) ) {
1036 $oUser =
oxNew(
'oxuser' );
1037 $this->
setViewData(
"reviewuserhash", $oUser->getReviewUserHash($oOrder->oxorder__oxuserid->value) );
1044 $aStore[
'INCLUDE_ANY'] = $oSmarty->security_settings[
'INCLUDE_ANY'];
1046 $iOldTplLang = $oLang->getTplLanguage();
1047 $iOldBaseLang = $oLang->getTplLanguage();
1048 $oLang->setTplLanguage( $iOrderLang );
1049 $oLang->setBaseLanguage( $iOrderLang );
1051 $oSmarty->security_settings[
'INCLUDE_ANY'] =
true;
1054 $this->
setBody( $oSmarty->fetch( $this->_sSenedNowTemplate ) );
1055 $this->
setAltBody( $oSmarty->fetch( $this->_sSenedNowTemplatePlain ) );
1057 $oLang->setTplLanguage( $iOldTplLang );
1058 $oLang->setBaseLanguage( $iOldBaseLang );
1060 $oSmarty->security_settings[
'INCLUDE_ANY'] = $aStore[
'INCLUDE_ANY'] ;
1063 $this->
setSubject( ( $sSubject !== null ) ? $sSubject : $oShop->oxshops__oxsendednowsubject->getRawValue() );
1065 $sFullName = $oOrder->oxorder__oxbillfname->getRawValue() .
" " . $oOrder->oxorder__oxbilllname->getRawValue();
1067 $this->
setRecipient( $oOrder->oxorder__oxbillemail->value, $sFullName );
1068 $this->
setReplyTo( $oShop->oxshops__oxorderemail->value, $oShop->oxshops__oxname->getRawValue() );
1070 return $this->
send();
1086 $iOrderLang = (int) ( isset( $oOrder->oxorder__oxlang->value ) ? $oOrder->oxorder__oxlang->value : 0 );
1089 $oShop = $this->
_getShop( $iOrderLang );
1100 $oUser =
oxNew(
'oxuser' );
1101 $this->
setViewData(
"reviewuserhash", $oUser->getReviewUserHash($oOrder->oxorder__oxuserid->value) );
1107 $aStore[
'INCLUDE_ANY'] = $oSmarty->security_settings[
'INCLUDE_ANY'];
1109 $iOldTplLang = $oLang->getTplLanguage();
1110 $iOldBaseLang = $oLang->getTplLanguage();
1111 $oLang->setTplLanguage( $iOrderLang );
1112 $oLang->setBaseLanguage( $iOrderLang );
1114 $oSmarty->security_settings[
'INCLUDE_ANY'] =
true;
1117 $this->
setBody( $oSmarty->fetch( $this->_sSendDownloadsTemplate ) );
1118 $this->
setAltBody( $oSmarty->fetch( $this->_sSendDownloadsTemplatePlain ) );
1120 $oLang->setTplLanguage( $iOldTplLang );
1121 $oLang->setBaseLanguage( $iOldBaseLang );
1123 $oSmarty->security_settings[
'INCLUDE_ANY'] = $aStore[
'INCLUDE_ANY'] ;
1126 $this->
setSubject( ( $sSubject !== null ) ? $sSubject : $oLang->translateString(
"DOWNLOAD_LINKS", null,
false) );
1128 $sFullName = $oOrder->oxorder__oxbillfname->getRawValue() .
" " . $oOrder->oxorder__oxbilllname->getRawValue();
1130 $this->
setRecipient( $oOrder->oxorder__oxbillemail->value, $sFullName );
1131 $this->
setReplyTo( $oShop->oxshops__oxorderemail->value, $oShop->oxshops__oxname->getRawValue() );
1133 return $this->
send();
1150 public function sendBackupMail( $aAttFiles, $sAttPath, $sEmailAddress, $sSubject, $sMessage, &$aStatus, &$aError )
1161 $this->
setRecipient( $oShop->oxshops__oxinfoemail->value,
"" );
1162 $sEmailAddress = $sEmailAddress ? $sEmailAddress : $oShop->oxshops__oxowneremail->value;
1164 $this->
setFrom( $sEmailAddress,
"" );
1168 $blAttashSucc =
true;
1170 foreach ( $aAttFiles as $iNum => $sAttFile ) {
1171 $sFullPath = $sAttPath . $sAttFile;
1172 if ( @is_readable( $sFullPath ) && @is_file( $sFullPath ) ) {
1173 $blAttashSucc = $this->
addAttachment( $sFullPath, $sAttFile );
1175 $blAttashSucc =
false;
1176 $aError[] = array( 5, $sAttFile );
1180 if ( !$blAttashSucc ) {
1181 $aError[] = array( 4,
"" );
1187 $blSend = $this->
send();
1208 if ( is_array($sTo) ) {
1209 foreach ($sTo as $sAddress) {
1219 $this->isHtml(
false );
1224 return $this->
send();
1239 $oArticleList =
oxNew(
"oxarticlelist" );
1240 $oArticleList->loadStockRemindProducts( $aBasketContents );
1243 if ( $oArticleList->count() ) {
1256 $this->
setRecipient( $oShop->oxshops__oxowneremail->value, $oShop->oxshops__oxname->getRawValue() );
1257 $this->
setFrom( $oShop->oxshops__oxowneremail->value, $oShop->oxshops__oxname->getRawValue() );
1258 $this->
setBody( $oSmarty->fetch( $this->getConfig()->getTemplatePath( $this->_sReminderMailTemplate,
false ) ) );
1260 $this->
setSubject( ( $sSubject !== null ) ? $sSubject : $oLang->translateString(
'STOCK_LOW' ) );
1262 $blSend = $this->
send();
1286 $this->
setFrom( $oParams->send_email, $oParams->send_name );
1296 $this->
setBody( $oSmarty->fetch( $this->_sWishListTemplate ) );
1297 $this->
setAltBody( $oSmarty->fetch( $this->_sWishListTemplatePlain ) );
1300 $this->
setRecipient( $oParams->rec_email, $oParams->rec_name );
1301 $this->
setReplyTo( $oParams->send_email, $oParams->send_name );
1303 return $this->
send();
1324 $iAlarmLang = $oAlarm->oxpricealarm__oxlang->value;
1326 $oArticle =
oxNew(
"oxarticle" );
1328 $oArticle->loadInLang( $iAlarmLang, $aParams[
'aid'] );
1335 $this->
setViewData(
"bidprice", $oLang->formatCurrency( $oAlarm->oxpricealarm__oxprice->value, $oCur ) );
1340 $this->
setRecipient( $oShop->oxshops__oxorderemail->value, $oShop->oxshops__oxname->getRawValue() );
1341 $this->
setSubject( ( $sSubject !== null ) ? $sSubject : $oLang->translateString(
'PRICE_ALERT_FOR_PRODUCT', $iAlarmLang ) .
" " . $oArticle->oxarticles__oxtitle->getRawValue() );
1342 $this->
setBody( $oSmarty->fetch( $this->_sOwnerPricealarmTemplate ) );
1343 $this->
setFrom( $aParams[
'email'],
"" );
1346 return $this->
send();
1366 if ( $oShop->getId() != $oAlarm->oxpricealarm__oxshopid->value) {
1367 $oShop =
oxNew(
"oxshop" );
1368 $oShop->load( $oAlarm->oxpricealarm__oxshopid->value);
1378 $this->
setViewData(
"product", $oAlarm->getArticle() );
1380 $this->
setViewData(
"bidprice", $oAlarm->getFProposedPrice() );
1381 $this->
setViewData(
"currency", $oAlarm->getPriceAlarmCurrency() );
1387 $this->
setSubject( $oShop->oxshops__oxname->value );
1389 if ( $sBody === null ) {
1390 $sBody = $oSmarty->fetch( $this->_sPricealamrCustomerTemplate );
1395 $this->addAddress( $sRecipient, $sRecipient );
1396 $this->
setReplyTo( $oShop->oxshops__oxorderemail->value, $oShop->oxshops__oxname->getRawValue() );
1398 if ( $sReturnMailBody ) {
1401 return $this->
send();
1416 protected function _includeImages($sImageDir = null, $sImageDirNoSSL = null, $sDynImageDir = null, $sAbsImageDir = null, $sAbsDynImageDir = null)
1419 if (preg_match_all(
'/<\s*img\s+[^>]*?src[\s]*=[\s]*[\'"]?([^[\'">]]+|.*?)?[\'">]/i', $sBody, $matches, PREG_SET_ORDER)) {
1422 $blReSetBody =
false;
1425 $sDynImageDir = $oFileUtils->normalizeDir( $sDynImageDir );
1426 $sImageDir = $oFileUtils->normalizeDir( $sImageDir );
1427 $sImageDirNoSSL = $oFileUtils->normalizeDir( $sImageDirNoSSL );
1429 if (is_array($matches) && count($matches)) {
1430 $aImageCache = array();
1433 $oImgGenerator =
oxNew(
"oxDynImgGenerator" );
1435 foreach ($matches as $aImage) {
1437 $image = $aImage[1];
1439 if ( strpos( $image, $sDynImageDir ) === 0 ) {
1440 $sFileName = $oFileUtils->normalizeDir( $sAbsDynImageDir ) . str_replace( $sDynImageDir,
'', $image );
1441 } elseif ( strpos( $image, $sImageDir ) === 0 ) {
1442 $sFileName = $oFileUtils->normalizeDir( $sAbsImageDir ) . str_replace( $sImageDir,
'', $image );
1443 } elseif ( strpos( $image, $sImageDirNoSSL ) === 0 ) {
1444 $sFileName = $oFileUtils->normalizeDir( $sAbsImageDir ) . str_replace( $sImageDirNoSSL,
'', $image );
1447 if ( $sFileName && !@is_readable( $sFileName ) ) {
1448 $sFileName = $oImgGenerator->getImagePath( $sFileName );
1453 if ( isset( $aImageCache[$sFileName] ) && $aImageCache[$sFileName] ) {
1454 $sCId = $aImageCache[$sFileName];
1456 $sCId = $myUtilsObject->generateUID();
1457 $sMIME = $myUtils->oxMimeContentType($sFileName);
1458 if ($sMIME ==
'image/jpeg' || $sMIME ==
'image/gif' || $sMIME ==
'image/png') {
1459 if ( $this->
addEmbeddedImage( $sFileName, $sCId,
"image",
"base64", $sMIME ) ) {
1460 $aImageCache[$sFileName] = $sCId;
1466 if ( $sCId && $sCId == $aImageCache[$sFileName] ) {
1467 if ( $sReplTag = str_replace( $image,
'cid:'.$sCId, $aImage[0] ) ) {
1468 $sBody = str_replace($aImage[0], $sReplTag, $sBody );
1469 $blReSetBody =
true;
1476 if ( $blReSetBody ) {
1492 $sSubject = str_replace(array(
'&',
'"',
''',
'<',
'>'), array(
'&',
'"',
"'",
'<',
'>' ), $sSubject);
1494 $this->
set(
"Subject", $sSubject );
1504 return $this->Subject;
1516 public function setBody( $sBody = null, $blClearSid =
true )
1518 if ( $blClearSid ) {
1519 $sBody =
getStr()->preg_replace(
'/((\?|&(amp;)?)(force_)?(admin_)?)sid=[A-Z0-9\.]+/i',
'\1sid=x&shp=' . $this->
getConfig()->getShopId(), $sBody);
1522 $this->
set(
"Body", $sBody );
1544 public function setAltBody( $sAltBody = null, $blClearSid =
true )
1546 if ( $blClearSid ) {
1547 $sAltBody =
getStr()->preg_replace(
'/((\?|&(amp;)?)(force_)?(admin_)?)sid=[A-Z0-9\.]+/i',
'\1sid=x&shp=' . $this->
getConfig()->getShopId(), $sAltBody);
1551 $sAltBody = str_replace(array(
'&',
'"',
''',
'<',
'>'), array(
'&',
'"',
"'",
'<',
'>' ), $sAltBody);
1553 $this->
set(
"AltBody", $sAltBody );
1563 return $this->AltBody;
1577 parent::AddAddress( $sAddress, $sName );
1580 $this->_aRecipients[] = array( $sAddress, $sName );
1605 $this->_aRecipients = array();
1623 $sEmail = $this->
_getShop()->oxshops__oxorderemail->value;
1626 $this->_aReplies[] = array( $sEmail, $sName );
1629 parent::addReplyTo( $sEmail, $sName );
1651 $this->_aReplies = array();
1663 public function setFrom( $sFromAddress, $sFromName = null )
1668 $sFromAddress = substr($sFromAddress, 0, 150);
1669 $sFromName = substr($sFromName, 0, 150);
1694 return $this->FromName;
1708 $this->_sCharSet = $sCharSet;
1724 $this->
set(
"Mailer", $sMailer );
1734 return $this->Mailer;
1746 $this->
set(
"Host", $sHost );
1756 return $this->ErrorInfo;
1769 $this->
set(
"WordWrap", $iWordWrap );
1781 $this->_blInlineImgEmail = $blUseImages;
1794 public function addAttachment( $sAttPath, $sAttFile =
'', $sEncoding =
'base64', $sType =
'application/octet-stream' )
1796 $this->_aAttachments[] = array( $sAttPath, $sAttFile, $sEncoding, $sType );
1818 public function addEmbeddedImage( $sFullPath, $sCid, $sAttFile =
'', $sEncoding =
'base64', $sType =
'application/octet-stream' )
1820 $this->_aAttachments[] = array( $sFullPath, basename($sFullPath), $sAttFile, $sEncoding, $sType,
false,
'inline', $sCid );
1841 $this->_aAttachments = array();
1856 if (stripos($sName,
'X-') !==
false) {
1882 $sOwnerMessage =
"Error sending eMail(". $this->
getSubject().
") to: \n\n";
1884 foreach ( $aRecipients as $aEMail ) {
1885 $sOwnerMessage .= $aEMail[0];
1886 $sOwnerMessage .= ( !empty($aEMail[1]) ) ?
' (' . $aEMail[1] .
')' :
'';
1887 $sOwnerMessage .=
" \n ";
1889 $sOwnerMessage .=
"\n\nError : " . $this->
getErrorInfo();
1894 $blRet = @mail( $oShop->oxshops__oxorderemail->value,
"eMail problem in shop!", $sOwnerMessage);
1967 $this->error_count = 0;
1968 $this->ErrorInfo =
'';
1986 $this->
setFrom( $oShop->oxshops__oxorderemail->value, $oShop->oxshops__oxname->getRawValue() );
1999 protected function _getShop( $iLangId = null, $iShopId = null )
2001 if ( $iLangId === null && $iShopId === null ) {
2002 if ( isset( $this->_oShop ) ) {
2005 return $this->_oShop = $this->
getConfig()->getActiveShop();
2011 $oShop =
oxNew(
'oxShop' );
2012 if ( $iShopId !== null ) {
2013 $oShop->setShopId($iShopId);
2015 if ( $iLangId !== null ) {
2016 $oShop->setLanguage($iLangId);
2033 $this->
set(
"SMTPAuth", true );
2034 $this->
set(
"Username", $sUserName );
2035 $this->
set(
"Password", $sUserPassword );
2047 $this->
set(
"SMTPDebug", $blDebug );
2057 $this->
set(
"PluginDir", getShopBasePath() .
"core/phpmailer/" );
2068 $oOutput =
oxNew(
"oxOutput" );
2069 $this->
setBody( $oOutput->process($this->getBody(),
"oxemail") );
2070 $this->
setAltBody( $oOutput->process($this->getAltBody(),
"oxemail") );
2071 $oOutput->processEmail( $this );
2085 $oEx =
oxNew(
"oxException" );
2086 $oEx->setMessage($oException->getMessage());
2088 if ( $this->
getConfig()->getConfigParam(
'iDebug' ) != 0 ) {
2104 $oOutputProcessor =
oxNew(
"oxOutput" );
2107 foreach ( $this->_aViewData as $sKey => $sValue ) {
2108 $oSmarty->assign( $sKey, $sValue );
2112 $aNewSmartyArray = $oOutputProcessor->processViewArray( $oSmarty->get_template_vars(),
"oxemail" );
2114 foreach ( $aNewSmartyArray as $key => $val ) {
2115 $oSmarty->assign( $key, $val );
2126 if ( !$this->_sCharSet ) {
2129 return $this->CharSet;
2152 $this->_oShop = $oShop;
2162 return $this->
getConfig()->getActiveView()->getViewConfig();
2172 return $this->
getConfig()->getActiveView();
2184 return $oConfig->getActShopCurrencyObject();
2197 $this->_aViewData[$sKey] = $sValue;
2219 if ( isset($this->_aViewData[$sKey]) ) {
2233 $this->_aViewData[
"oUser"] = $oUser;
2243 return $this->_aViewData[
"oUser"];
2255 $oOrderList =
oxNew(
'oxOrderFileList');
2256 $oOrderList->loadOrderFiles( $sOrderId );
2258 if ( count($oOrderList) > 0 ) {