diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-10-16 20:50:12 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-10-16 20:50:12 -0400 |
commit | f99a3c501fd6ed7b4914b8d6e855489c2ce5b219 (patch) | |
tree | 976276d6acfff78923e4549b0ef9ea94c5e2cb0d /app/Core/Mail/Transport/Smtp.php | |
parent | 9c9ed02cd7ebc5dbbc99bcaed6f80988ce8a9677 (diff) |
Make mail transports pluggable and move integrations to plugins
- Postmark: https://github.com/kanboard/plugin-postmark
- Mailgun: https://github.com/kanboard/plugin-mailgun
- Sendgrid: https://github.com/kanboard/plugin-sendgrid
Diffstat (limited to 'app/Core/Mail/Transport/Smtp.php')
-rw-r--r-- | app/Core/Mail/Transport/Smtp.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/app/Core/Mail/Transport/Smtp.php b/app/Core/Mail/Transport/Smtp.php new file mode 100644 index 00000000..757408ea --- /dev/null +++ b/app/Core/Mail/Transport/Smtp.php @@ -0,0 +1,30 @@ +<?php + +namespace Kanboard\Core\Mail\Transport; + +use Swift_SmtpTransport; + +/** + * PHP Mail Handler + * + * @package transport + * @author Frederic Guillot + */ +class Smtp extends Mail +{ + /** + * Get SwiftMailer transport + * + * @access protected + * @return \Swift_Transport + */ + protected function getTransport() + { + $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); + + return $transport; + } +} |