-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Event updates now send out an email to all subscribers
Updates #144
- Loading branch information
Showing
6 changed files
with
52 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
/** | ||
* @copyright 2018 City of Bloomington, Indiana | ||
* @license http://www.gnu.org/licenses/agpl.txt GNU/AGPL, see LICENSE.txt | ||
* @param Event $this->event | ||
*/ | ||
declare (strict_types=1); | ||
$this->_include('events/partials/emailHeader.inc'); | ||
$this->_include('events/info.inc'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
This is an automated email message from inRoads. | ||
|
||
inRoads is a digital service of the City of Bloomington to publish planned | ||
and future road closings, lane reductions, parking reservations and more. | ||
inRoads can be accessed online at http://bloomington.in.gov/inroads. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
#!/usr/local/bin/php | ||
<?php | ||
/** | ||
* @copyright 2015 City of Bloomington, Indiana | ||
* @copyright 2015-2018 City of Bloomington, Indiana | ||
* @license http://www.gnu.org/licenses/agpl.txt GNU/AGPL, see LICENSE.txt | ||
* @author Cliff Ingham <[email protected]> | ||
*/ | ||
use Application\Models\EventType; | ||
use Application\Models\GoogleGateway; | ||
|
@@ -22,14 +21,14 @@ | |
$filters['eventTypes'][] = $type->getCode(); | ||
} | ||
} | ||
$list = GoogleGateway::getEvents(GOOGLE_CALENDAR_ID, $start, $end, $filters); | ||
$block = new Block('events/summary.inc', [ | ||
$list = GoogleGateway::getEvents(GOOGLE_CALENDAR_ID, $start, $end, $filters); | ||
$block = new Block('events/summary.inc', [ | ||
'start' => $start, | ||
'end' => $end, | ||
'eventList' => $list | ||
]); | ||
|
||
$message = $block->render('txt'); | ||
$subject = 'Road closings for the week: '.$start->format(DATE_FORMAT).' to '.$end->format(DATE_FORMAT); | ||
$from = 'From: '.ADMINISTRATOR_EMAIL; | ||
$template = new Template('default', 'txt'); | ||
$message = $block->render('txt', $template); | ||
$subject = 'Road closings for the week: '.$start->format(DATE_FORMAT).' to '.$end->format(DATE_FORMAT); | ||
$from = 'From: '.ADMINISTRATOR_EMAIL; | ||
mail(GOOGLE_GROUP, $subject, $message, $from); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters