aboutsummaryrefslogtreecommitdiff
path: root/classes/Contact.php
diff options
context:
space:
mode:
authorCamil Staps2016-07-31 09:40:25 +0200
committerCamil Staps2016-07-31 09:40:25 +0200
commit1ec8d12a7b125d41ecb723c5d83f2afef95408e9 (patch)
tree4d103ccbab48d2217e1ae13d37c229e4060e9184 /classes/Contact.php
parentGive new files a key (diff)
0.5.2 emails
Diffstat (limited to 'classes/Contact.php')
-rw-r--r--classes/Contact.php11
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;
+ }
}