Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
HtmlFormatter example
$recipients
=
array_filter
(
explode
(
"\n",
$config
->
get
(
'logMailAddress'
)
)
)
;
if
(
\
count
(
$recipients
)
< 1
)
{
$recipients
[
]
=
$config
->
get
(
'mail'
)
;
}
$mailer
=
new
\
Enlight_Components_Mail
(
)
;
$mailer
->
addTo
(
$recipients
)
;
$mailer
->
setSubject
(
'Error in shop "' .
$config
->
get
(
'shopName'
)
. '".'
)
;
$mailHandler
=
new
EnlightMailHandler
(
$mailer
,
$logLevel
)
;
$mailHandler
->
pushProcessor
(
new
ShopwareEnvironmentProcessor
(
)
)
;
$mailHandler
->
setFormatter
(
new
HtmlFormatter
(
)
)
;
return
new
BufferHandler
(
$mailHandler
, 0, Logger::ERROR
)
;
}
}