diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-06-06 14:10:31 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-06-06 14:10:31 -0400 |
commit | 9d9e3afba2054bfa23ba6f019b7c8885c2d8415e (patch) | |
tree | 1113e318c3d5e15bed48480f90f5498347343783 /app/ServiceProvider/MailerProvider.php | |
parent | c87e1fbc33416e7b2f59b98c2ffed173958b3146 (diff) |
Improve email sending system and add Postmark as mail transport
Diffstat (limited to 'app/ServiceProvider/MailerProvider.php')
-rw-r--r-- | app/ServiceProvider/MailerProvider.php | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/app/ServiceProvider/MailerProvider.php b/app/ServiceProvider/MailerProvider.php deleted file mode 100644 index 6469a737..00000000 --- a/app/ServiceProvider/MailerProvider.php +++ /dev/null @@ -1,33 +0,0 @@ -<?php - -namespace ServiceProvider; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; -use Swift_SmtpTransport; -use Swift_SendmailTransport; -use Swift_MailTransport; - -class MailerProvider implements ServiceProviderInterface -{ - public function register(Container $container) - { - $container['mailer'] = function () { - switch (MAIL_TRANSPORT) { - case 'smtp': - $transport = Swift_SmtpTransport::newInstance(MAIL_SMTP_HOSTNAME, MAIL_SMTP_PORT); - $transport->setUsername(MAIL_SMTP_USERNAME); - $transport->setPassword(MAIL_SMTP_PASSWORD); - $transport->setEncryption(MAIL_SMTP_ENCRYPTION); - break; - case 'sendmail': - $transport = Swift_SendmailTransport::newInstance(MAIL_SENDMAIL_COMMAND); - break; - default: - $transport = Swift_MailTransport::newInstance(); - } - - return $transport; - }; - } -} |