added smtp_encryption config parameter
This commit is contained in:
parent
b767da324a
commit
6c76208992
2 changed files with 5 additions and 1 deletions
|
|
@ -50,6 +50,7 @@ class InstallCommand extends Command
|
|||
|
||||
$conf['phpci']['email_settings']['smtp_address'] = $this->ask('(Optional) Smtp server address: ', true);
|
||||
$conf['phpci']['email_settings']['smtp_port'] = $this->ask('(Optional) Smtp port: ', true);
|
||||
$conf['phpci']['email_settings']['smtp_encryption'] = $this->ask('(Optional) Smtp encryption: ', true);
|
||||
$conf['phpci']['email_settings']['smtp_username'] = $this->ask('(Optional) Smtp Username: ', true);
|
||||
$conf['phpci']['email_settings']['smtp_password'] = $this->ask('(Optional) Smtp Password: ', true);
|
||||
$conf['phpci']['email_settings']['from_address'] = $this->ask('(Optional) Email address to send from: ', true);
|
||||
|
|
|
|||
|
|
@ -140,7 +140,8 @@ class Email implements \PHPCI\Plugin
|
|||
/** @var \Swift_SmtpTransport $transport */
|
||||
$transport = \Swift_SmtpTransport::newInstance(
|
||||
$this->getMailConfig('smtp_address'),
|
||||
$this->getMailConfig('smtp_port')
|
||||
$this->getMailConfig('smtp_port'),
|
||||
$this->getMailConfig('smtp_encryption')
|
||||
);
|
||||
$transport->setUsername($this->getMailConfig('smtp_username'));
|
||||
$transport->setPassword($this->getMailConfig('smtp_password'));
|
||||
|
|
@ -164,6 +165,8 @@ class Email implements \PHPCI\Plugin
|
|||
return null;
|
||||
case 'smtp_port':
|
||||
return '25';
|
||||
case 'smtp_encryption':
|
||||
return null;
|
||||
case 'from_address':
|
||||
return "notifications-ci@phptesting.org";
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue