diff options
author | Camil Staps | 2016-07-31 09:40:25 +0200 |
---|---|---|
committer | Camil Staps | 2016-07-31 09:40:25 +0200 |
commit | 1ec8d12a7b125d41ecb723c5d83f2afef95408e9 (patch) | |
tree | 4d103ccbab48d2217e1ae13d37c229e4060e9184 /classes/Contact.php | |
parent | Give new files a key (diff) |
0.5.2 emails
Diffstat (limited to 'classes/Contact.php')
-rw-r--r-- | classes/Contact.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/classes/Contact.php b/classes/Contact.php index 6ab4803..4a82ade 100644 --- a/classes/Contact.php +++ b/classes/Contact.php @@ -73,4 +73,15 @@ class Contact extends Model { throw new Exception($error[2]); } } + + /** + * Make a mailer to send to this contact + * + * @return Mailer The mailer + */ + public function mailer() { + $mailer = new Mailer($this->pdo); + $mailer->addAddress($this->email, $this->name); + return $mailer; + } } |