Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
SMTPAuthenticate example
protected
function
sendWithSmtp
(
)
{
if
(
$this
->SMTPHost === ''
)
{
$this
->
setErrorMessage
(
lang
(
'Email.noHostname'
)
)
;
return
false;
}
if
(
!
$this
->
SMTPConnect
(
)
|| !
$this
->
SMTPAuthenticate
(
)
)
{
return
false;
}
if
(
!
$this
->
sendCommand
(
'from',
$this
->
cleanEmail
(
$this
->headers
[
'From'
]
)
)
)
{
$this
->
SMTPEnd
(
)
;
return
false;
}
foreach
(
$this
->recipients
as
$val
)
{
if
(
!
$this
->
sendCommand
(
'to',
$val
)
)
{