summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/common.php2
-rw-r--r--config.default.php1
-rw-r--r--docs/email-configuration.markdown18
3 files changed, 21 insertions, 0 deletions
diff --git a/app/common.php b/app/common.php
index 9d48442b..f92e3ddb 100644
--- a/app/common.php
+++ b/app/common.php
@@ -91,6 +91,7 @@ defined('MAIL_SMTP_HOSTNAME') or define('MAIL_SMTP_HOSTNAME', '');
defined('MAIL_SMTP_PORT') or define('MAIL_SMTP_PORT', 25);
defined('MAIL_SMTP_USERNAME') or define('MAIL_SMTP_USERNAME', '');
defined('MAIL_SMTP_PASSWORD') or define('MAIL_SMTP_PASSWORD', '');
+defined('MAIL_SMTP_ENCRYPTION') or define('MAIL_SMTP_ENCRYPTION', null);
defined('MAIL_SENDMAIL_COMMAND') or define('MAIL_SENDMAIL_COMMAND', '/usr/sbin/sendmail -bs');
$loader = new Loader;
@@ -166,6 +167,7 @@ $registry->mailer = function() use ($registry) {
$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);
diff --git a/config.default.php b/config.default.php
index 9e597488..6986cd48 100644
--- a/config.default.php
+++ b/config.default.php
@@ -11,6 +11,7 @@ define('MAIL_SMTP_HOSTNAME', '');
define('MAIL_SMTP_PORT', 25);
define('MAIL_SMTP_USERNAME', '');
define('MAIL_SMTP_PASSWORD', '');
+define('MAIL_SMTP_ENCRYPTION', null); // Valid values are "null", "ssl" or "tls"
// Sendmail command to use when the transport is "sendmail"
define('MAIL_SENDMAIL_COMMAND', '/usr/sbin/sendmail -bs');
diff --git a/docs/email-configuration.markdown b/docs/email-configuration.markdown
index eced715d..974f972e 100644
--- a/docs/email-configuration.markdown
+++ b/docs/email-configuration.markdown
@@ -34,6 +34,24 @@ define('MAIL_SMTP_USERNAME', 'username');
define('MAIL_SMTP_PASSWORD', 'super password');
```
+It's also possible to use a secure connection, TLS or SSL:
+
+```php
+define('MAIL_SMTP_ENCRYPTION', 'ssl'); // Valid values are "null", "ssl" or "tls"
+```
+
+Here an example with Google:
+
+```php
+define('MAIL_SMTP_HOSTNAME', 'smtp.gmail.com');
+define('MAIL_SMTP_PORT', 465);
+define('MAIL_SMTP_USERNAME', 'my_account@gmail.com');
+define('MAIL_SMTP_PASSWORD', 'my google password');
+define('MAIL_SMTP_ENCRYPTION', 'ssl');
+```
+
+To use Google, you might need to allow Kanboard to use your Google account, see ["Allowing less secure apps to access your account"](https://support.google.com/accounts/answer/6010255) and ["My client isn't accepting my username and password"](https://support.google.com/mail/answer/14257).
+
### Sendmail configuration
By default the sendmail command will be `/usr/sbin/sendmail -bs` but you can customize that in your config file.