ef60cd4d
Administrator
first commit
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<?php
namespace MyMailer;
class Event extends Mailer{
public function SendForSelect($template, $users)
{
foreach($users as $user){
$this->setToMail($user['email']);
$this->setMailMessage($template->text);
$this->setTitle($template->title);
$this->SendEmail();
}
}
//send for selected users from list
public function SendDelivery($model,$template, $data, $users =array() )
{
if(!$users) {
|
ef60cd4d
Administrator
first commit
|
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
$this->setMailMessage($template['text']);
$this->setTitle($template['title']);
$campaign_id = $this->mailer->createCampaignDelivery($this->to_email, $this->from_email, $this->from_name, $this->title, $this->mailMessage);
$delivery = array(
'campaign_id' => $campaign_id,
'campaign' => $data['utm_campaign'],
'name' => $data['name'],
'event_id' => $data['id'],
'status' => '0',
'project_id' => $data['project_id']
);
$model->save($delivery);
}
}
|