if ($optInNewsletter) { $hash = Random::
getAlphanumericString(32
);
$data =
serialize(['newsletter' =>
$email, 'subscribeToNewsletter' => true
]);
$link =
$this->front->
ensureRouter()->
assemble([ 'sViewport' => 'newsletter',
'action' => 'index',
'sConfirmation' =>
$hash,
'module' => 'frontend',
]);
$this->
sendMail($email, 'sOPTINNEWSLETTER',
$link);
$this->db->
insert( 's_core_optin',
[ 'datum' =>
new Zend_Date(),
'hash' =>
$hash,
'data' =>
$data,
'type' => 'swNewsletter',
] );