File: Notifications_Email.php

package info (click to toggle)
spotweb 20130826%2Bdfsg2-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 5,132 kB
  • ctags: 11,281
  • sloc: php: 31,367; xml: 1,009; sh: 148; makefile: 83
file content (21 lines) | stat: -rwxr-xr-x 578 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
class Notifications_Email extends Notifications_abs {
	private $_dataArray;
	private $_appName;

	function __construct($appName, array $dataArray) {
		$this->_appName = $appName;
		$this->_dataArray = $dataArray;
	} # ctor

	function register() {
		return;
	} # register

	function sendMessage($type, $title, $body, $sourceUrl) {
		$header = "From: ". $this->_appName . " <" . $this->_dataArray['sender'] . ">\r\n";
		$body = wordwrap($body, 70);
		mail($this->_dataArray['receiver'], $title, $body, $header);
	} # sendMessage

} # Notifications_Email