Commit 2989bb14 authored by Mark Harding's avatar Mark Harding Committed by Mark Harding

(chore): august blogs email

parent 8e6942b6
No related merge requests found
Pipeline #78683005 running with stages
......@@ -26,7 +26,7 @@ class WithBlogs implements EmailBatchInterface
protected $templatePath;
/** @var string $subject */
protected $subject;
protected $subject = "Top blogs from August";
public function __construct($manager = null, $trendingRepository = null, $builder = null)
{
......@@ -98,7 +98,7 @@ class WithBlogs implements EmailBatchInterface
$i = 0;
foreach ($iterator as $user) {
$user = new \Minds\Entities\User('mark');
// $user = new \Minds\Entities\User('mark');
++$i;
echo "\n[$i]: $user->guid ($iterator->offset)";
......@@ -117,7 +117,7 @@ class WithBlogs implements EmailBatchInterface
->send();
echo ' sent';
exit;
// exit;
}
}
......@@ -137,16 +137,14 @@ class WithBlogs implements EmailBatchInterface
$options['guids'] = $result['guids'];*/
$options['guids'] = [
'998738105104236544',
'999467832663445504',
'966409629405708288',
'993006058717818880',
'973946575102472192',
'1006629205218992128',
'1005557700564246528',
'1010584762553004032',
'1006684770592301056',
'977770227199016960',
'1002988949318565888',
'996468067362422784',
'993621806187380736',
'971156445331410944',
'983472046539116544',
'952732651199864832',
'1001223653028548608',
];
$blogs = $this->builder->get(array_merge([
......
......@@ -38,6 +38,9 @@ class WithBlogs extends EmailCampaign
public function send()
{
if (!method_exists($this->user, 'getEmail')) {
return;
}
$this->template->setTemplate('default.tpl');
$this->template->setBody("./Templates/missed-blogs.tpl");
......@@ -65,7 +68,7 @@ class WithBlogs extends EmailCampaign
$this->template->set('validator', $validatorHash);
$subject = "Here's 10 fascinating top articles";
$subject = "Top blogs from August";
$message = new Message();
$message->setTo($this->user)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment