Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
isHtml example
if
(
!
empty
(
$fromMail
)
&& !
empty
(
$fromName
)
)
{
$mail
->
setFrom
(
$fromMail
,
$fromName
)
;
}
elseif
(
!
empty
(
$fromMail
)
)
{
$mail
->
setFrom
(
$fromMail
)
;
}
$bodyText
=
$stringCompiler
->
compileString
(
$mailModel
->
getContent
(
)
)
;
$mail
->
setBodyText
(
$bodyText
)
;
if
(
$mailModel
->
isHtml
(
)
)
{
$mail
->
setBodyHtml
(
$stringCompiler
->
compileString
(
$mailModel
->
getContentHtml
(
)
)
)
;
}
foreach
(
$mailModel
->
getAttachments
(
)
as
$attachment
)
{
if
(
$attachment
->
getShopId
(
)
!== null
&&
(
$this
->
getShop
(
)
=== null ||
$attachment
->
getShopId
(
)
!==
$this
->
getShop
(
)
->
getId
(
)
)
)
{
continue
;
}
$mediaService
=
Shopware
(
)
->
Container
(
)
->
get
(
MediaServiceInterface::
class
)
;
if
(
!
$mediaService
->
has
(
$attachment
->
getPath
(
)
)
)
{