-
Notifications
You must be signed in to change notification settings - Fork 0
/
newsletterNotificationClass.php
53 lines (38 loc) · 1.36 KB
/
newsletterNotificationClass.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
class newsletterNotificationClass {
public function myActivateRecipient($strEmail, $arrRecipients, $arrChannels)
{
$objEmail = new Email();
$objEmail->subject = 'Neue Newsletteranmeldung';
$objEmail->from = EMAIL_FROM;
$objEmail->fromName = EMAIL_FROMNAME;
$objEmail->text = "Es gibt eine neue Newsletter-Anmeldung:\n";
$objEmail->text .= $strEmail."\n\n";
$objEmail->text .= "in folgende Verteiler:\n";
$arrChannelTitles = \NewsletterChannelModel::findByIds($arrChannels);
foreach($arrChannelTitles as $key=>$value)
{
$objEmail->text .= "Channel-ID: " . $value->id ." (".$value->title .")\n";
}
$objEmail->sendTo(EMAIL_ADMIN);
unset($objMail);
}
public function myRemoveRecipient($strEmail, $arrChannels)
{
$objEmail = new Email();
$objEmail->subject = 'Abmeldung vom Newsletter';
$objEmail->from = EMAIL_FROM;
$objEmail->fromName = EMAIL_FROMNAME;
$objEmail->text = "Es gibt eine Abmeldung vom Newsletter:\n";
$objEmail->text .= $strEmail."\n\n";
$objEmail->text .= "aus folgenden Verteilern:\n";
$arrChannelTitles = \NewsletterChannelModel::findByIds($arrChannels);
foreach($arrChannelTitles as $key=>$value)
{
$objEmail->text .= "Channel-ID: " . $value->id ." (".$value->title .")\n";
}
$objEmail->sendTo(EMAIL_ADMIN);
unset($objMail);
}
}
?>