Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@ GOTRUE_SMTP_HOST=smtp.mandrillapp.com
GOTRUE_SMTP_PORT=587
GOTRUE_SMTP_USER=smtp-delivery@example.com
GOTRUE_SMTP_PASS=correcthorsebatterystaple
GOTRUE_SMTP_INSECURE=false
GOTRUE_SMTP_ADMIN_EMAIL=support@example.com
GOTRUE_MAILER_SUBJECTS_CONFIRMATION="Please confirm"
```
Expand All @@ -532,6 +533,10 @@ If the mail server requires authentication, the username to use.

If the mail server requires authentication, the password to use.

`SMTP_INSECURE` - `bool`

If the mail server requires TLS, but does not provide a valid certificate, you can set this to `true` to skip certificate verification. Defaults to `false`.

`SMTP_MAX_FREQUENCY` - `number`

Controls the minimum amount of time that must pass before sending another signup confirmation or password reset email. The value is the number of seconds. Defaults to 900 (15 minutes).
Expand Down
1 change: 1 addition & 0 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"GOTRUE_SMTP_HOST": {},
"GOTRUE_SMTP_PASS": {},
"GOTRUE_SMTP_PORT": {},
"GOTRUE_SMTP_INSECURE": {},
"GOTRUE_MAILER_SITE_URL": {},
"GOTRUE_MAILER_SUBJECTS_CONFIRMATION": {},
"GOTRUE_MAILER_SUBJECTS_RECOVERY": {},
Expand Down
1 change: 1 addition & 0 deletions example.env
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ PORT="9999"
GOTRUE_SMTP_HOST=""
GOTRUE_SMTP_PORT=""
GOTRUE_SMTP_USER=""
GOTRUE_SMTP_INSECURE=false
GOTRUE_SMTP_MAX_FREQUENCY="5s"
GOTRUE_SMTP_PASS=""
GOTRUE_SMTP_ADMIN_EMAIL=""
Expand Down
1 change: 1 addition & 0 deletions internal/conf/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ type SMTPConfiguration struct {
Host string `json:"host"`
Port int `json:"port,omitempty" default:"587"`
User string `json:"user"`
Insecure bool `json:"insecure,omitempty" default:"false"`
Pass string `json:"pass,omitempty"`
AdminEmail string `json:"admin_email" split_words:"true"`
SenderName string `json:"sender_name" split_words:"true"`
Expand Down
1 change: 1 addition & 0 deletions internal/mailer/mailer.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ func NewMailer(globalConfig *conf.GlobalConfiguration) Mailer {
Port: globalConfig.SMTP.Port,
User: globalConfig.SMTP.User,
Pass: globalConfig.SMTP.Pass,
Insecure: globalConfig.SMTP.Insecure,
LocalName: u.Hostname(),
From: from,
BaseURL: globalConfig.SiteURL,
Expand Down