RecipientHandlerSiteMail.php in Simplenews 8.2
File
modules/simplenews_demo/src/Plugin/simplenews/RecipientHandler/RecipientHandlerSiteMail.php
View source
<?php
namespace Drupal\simplenews_demo\Plugin\simplenews\RecipientHandler;
use Drupal\simplenews\Plugin\simplenews\RecipientHandler\RecipientHandlerBase;
class RecipientHandlerSiteMail extends RecipientHandlerBase {
public function addToSpool() {
$subscriber_data = [
'mail' => \Drupal::config('system.site')
->get('mail'),
];
$this
->addArrayToSpool('data', [
$subscriber_data,
]);
return 1;
}
protected function doCount() {
return 1;
}
}