From 4baf20ce83046eb99a324c5fc4509534f54dfbeb Mon Sep 17 00:00:00 2001 From: Grant Gaudet Date: Sun, 1 Dec 2013 19:54:43 -0800 Subject: [PATCH] Class include for HTML formatting and SMTP delivery --- includes/HTMLMailSystem__SmtpMailSystem.mail.inc | 25 ++++++++++++++++++++++++ mailsystem.info | 1 + 2 files changed, 26 insertions(+) create mode 100644 includes/HTMLMailSystem__SmtpMailSystem.mail.inc diff --git a/includes/HTMLMailSystem__SmtpMailSystem.mail.inc b/includes/HTMLMailSystem__SmtpMailSystem.mail.inc new file mode 100644 index 0000000..e2b212c --- /dev/null +++ b/includes/HTMLMailSystem__SmtpMailSystem.mail.inc @@ -0,0 +1,25 @@ +formatClass = new HTMLMailSystem; + } + else { + $this->formatClass = new DefaultMailSystem; + } + if (drupal_autoload_class('SmtpMailSystem')) { + $this->mailClass = new SmtpMailSystem; + } + else { + $this->mailClass = new DefaultMailSystem; + } + } + public function format(array $message) { + return $this->formatClass->format($message); + } + public function mail(array $message) { + return $this->mailClass->mail($message); + } +} diff --git a/mailsystem.info b/mailsystem.info index 616051c..51029fe 100644 --- a/mailsystem.info +++ b/mailsystem.info @@ -5,3 +5,4 @@ php = 5.0 core = 7.x configure = admin/config/system/mailsystem dependencies[] = filter +files[] = includes/HTMLMailSystem__SmtpMailSystem.mail.inc -- 1.8.4.2