Daan is sweet to Kelley and delegates himself TestCMS code reflection
[ssproject1617.git] / testcms-final-anon / system / classes / email.php
1 <?php defined('IN_CMS') or die('No direct access allowed.');
2
3 class Email {
4
5 private static function headers($headers) {
6 $str = '';
7
8 foreach($headers as $key => $value) {
9 $str .= $key . ': ' . $value . PHP_EOL;
10 }
11
12 return $str;
13 }
14
15 public static function send($to, $subject, $message, $headers = array()) {
16 return mail($to, $subject, $message, static::headers($headers));
17 }
18
19 }