summaryrefslogtreecommitdiff
path: root/docs/email-configuration.markdown
blob: 8b2727b0f3678d3af791bb18565a2bf250892cec (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
Email configuration
===================

User settings
-------------

To receive email notifications, users of Kanboard must have:

- Activated notifications in the settings page
- Have a valid email address in their profile

Server settings
---------------

By default, Kanboard will use the bundled PHP mail function to send emails.
Usually that require no configuration if your server can already send emails.

However, it's possible to use other methods, the SMTP protocol and Sendmail.

### SMTP configuration

Create a blank `config.php` file or use the template `config.default.php` and set those values:

```php
// We choose "smtp" as mail transport
define('MAIL_TRANSPORT', 'smtp');

// We define our server settings
define('MAIL_SMTP_HOSTNAME', 'mail.example.com');
define('MAIL_SMTP_PORT', 25);

// Credentials for authentication on the SMTP server (not mandatory)
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.

Example:

```php
// We choose "sendmail" as mail transport
define('MAIL_TRANSPORT', 'sendmail');

// If you need to change the sendmail command, replace the value
define('MAIL_SENDMAIL_COMMAND', '/usr/sbin/sendmail -bs');
```

### The sender email address

By default, emails will use the sender address `notifications@kanboard.net`.
It's not possible to reply to this address.

You can customize this address by changing the value of the constant `MAIL_FROM` in your config file.

```php
define('MAIL_FROM', 'notifications@kanboard.net');
```

That can be useful if your SMTP server configuration doesn't accept the default address.

### How to display a link to the task in notifications?

To do that, you have to specify the URL of your Kanboard installation in your [Application Settings](http://kanboard.net/documentation/application-configuration).
By default, nothing is defined, so no links will be displayed.

Examples:

- http://demo.kanboard.net/
- http://myserver/kanboard/
- http://kanboard.mydomain.com/

Don't forget the ending `/`.

You need to define that manually because Kanboard can't guess the URL from a command line script and some people have very specific configuration.