blob: 66f0a3aad0a196e52c694f3cf180dedeabf070e7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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|\Swift_MailTransport|\Swift_SmtpTransport|\Swift_SendmailTransport
*/
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;
}
}
|