Archived
1
0
This repository has been archived on 2020-12-10. You can view files and clone it, but cannot push or open issues or pull requests.
old/application/models/EmailModel.php

27 lines
727 B
PHP
Raw Normal View History

<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class EmailModel extends CI_Model
{
function __construct()
{
parent::__construct();
}
function sendMail($recipient, $subject, $template, $templateData) {
$this->load->library('email');
$config['mailtype'] = 'html';
$this->email->initialize($config);
$this->email->from('no-reply@kingofdog.eu', 'KingOfDog.eu');
$this->email->to($recipient);
$this->email->subject($subject);
2018-10-28 16:37:58 +00:00
$this->email->message($this->load->view('emails/' . $template, $templateData, true));
$this->email->send();
}
}