/**
* Cron action method
*
* Sends the newsletter emails as a cronjob.
*/
public function cronAction() { /** @var Shopware_Plugins_Core_Cron_Bootstrap|null $cronBootstrap */
$cronBootstrap =
$this->
getPluginBootstrap('Cron'
);
if ($cronBootstrap && !
$cronBootstrap->
authorizeCronAction($this->
Request())) { $this->
Response() ->
clearHeaders() ->
setStatusCode(Response::HTTP_FORBIDDEN
) ->
appendBody('Forbidden'
);
return;
} $this->
Response()->headers->
set('content-type', 'text/plain'
);
$this->
mailAction();
}