Chyba #958 » smtp-encryption-support.patch
application/controllers/settings.php | ||
---|---|---|
*/
|
||
public function email()
|
||
{
|
||
require_once Kohana::find_file('vendor', 'swift/Swift/Connection/SMTP');
|
||
|
||
// access control
|
||
if (!module::e('email') ||
|
||
!$this->acl_check_edit('Settings_Controller', 'email_settings'))
|
||
... | ... | |
->rules('valid_numeric')
|
||
->value(Settings::get('email_port'))
|
||
->help(__('For SMTP settings only.'));
|
||
|
||
$encryptions = array
|
||
(
|
||
Swift_Connection_SMTP::ENC_OFF => __('Off'),
|
||
Swift_Connection_SMTP::ENC_SSL => __('SSL'),
|
||
Swift_Connection_SMTP::ENC_TLS => __('TLS'),
|
||
);
|
||
|
||
$this->form->dropdown('email_encryption')
|
||
->options($encryptions)
|
||
->label('Encryption')
|
||
->selected(Settings::get('email_encryption'))
|
||
->help(__('For SMTP settings only.'));
|
||
$this->form->input('email_username')
|
||
->label('User name')
|
application/helpers/email.php | ||
---|---|---|
$connection = new Swift_Connection_SMTP
|
||
(
|
||
Settings::get('email_hostname'),
|
||
Settings::get('email_port')
|
||
Settings::get('email_port'),
|
||
Settings::get('email_encryption')
|
||
);
|
||
// Do authentication, if part of the DSN
|
application/i18n/cs_CZ/texts.php | ||
---|---|---|
'enable' => 'Zapnout',
|
||
'enabled' => 'Zapnuto',
|
||
'enabled countries' => 'Povolené země',
|
||
'encryption' => 'Šifrování',
|
||
'end date' => 'Koncové datum',
|
||
'end editing of registrations' => 'Ukončit upravování přihlášek',
|
||
'end membership' => 'Ukončit členství',
|
application/libraries/Settings.php | ||
---|---|---|
*
|
||
*/
|
||
require_once Kohana::find_file('vendor', 'swift/Swift/Connection/SMTP');
|
||
/**
|
||
* Settings of whole FreenetIS.
|
||
* Settings are cached except passwords because of security.
|
||
... | ... | |
'email_driver' => 'native',
|
||
// default email port
|
||
'email_port' => 25,
|
||
// default email encryption
|
||
'email_encryption' => Swift_Connection_SMTP::ENC_OFF,
|
||
// default value for prefix of subject of notification
|
||
// e-mails to members
|
||
'email_subject_prefix' => 'FreenetIS',
|
||
... | ... | |
*/
|
||
private static function init()
|
||
{
|
||
|
||
// not connected? connect!
|
||
if (!self::$config_model)
|
||
{
|