]> BookStack Code Mirror - website/blob - content/docs/admin/email-config.md
fb1343257349fcac778a4081c77bb8e2a9d13f18
[website] / content / docs / admin / email-config.md
1 +++
2 title = "Email Configuration"
3 description = "Configuring BookStack to send email"
4 date = "2020-03-14"
5 type = "admin-doc"
6 slug = "email-config"
7 +++
8
9 BookStack sends out emails for a range of purposes such as email-address confirmation & "forgot password" flows.
10 The following mechanisms for sending mail are supported:
11
12 1. SMTP
13 3. Sendmail (Linux sendmail)
14
15 ## SMTP
16
17 To get up and running with SMTP you will need to add, or set, the following variables in your `.env` file:
18
19 ```bash
20 MAIL_DRIVER=smtp
21
22 # Host, Port & Encryption mechanism to use
23 MAIL_HOST=smtp.provider.tld
24 MAIL_PORT=465
25 MAIL_ENCRYPTION=tls
26
27 # Authentication details for your SMTP service
28 MAIL_USERNAME=user@provider.tld
29 MAIL_PASSWORD=onlyifneeded
30
31 # The "from" email address for outgoing email
32 MAIL_FROM=noreply@yourdomain.tld  
33
34 # The "from" name used for outgoing email
35 MAIL_FROM_NAME=BookStack
36 ```
37
38 ## Sendmail
39
40 The `sendmail` drivers uses the sendmail application on the host system. It will call `/usr/sbin/sendmail -bs`.
41
42 To enable this option you can set the following in your `.env` file:
43
44 ```bash
45 MAIL_DRIVER=sendmail
46
47 # The "from" email address for outgoing email
48 MAIL_FROM=noreply@yourdomain.tld  
49
50 # The "from" name used for outgoing email
51 MAIL_FROM_NAME=BookStack
52 ```
53
54 ## Debugging
55
56 You can follow the instructions provided in the [debugging documentation page](/docs/admin/debugging/)
57 to help gain more details about issues you may come across. Within the Settings > Maintenance area of
58 BookStack you can find a "Send a Test Email" action which provides a quick & easy way to send emails
59 after changing your configuration. This action will also attempt to capture any errors thrown and display them.