Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(config): allow custom admin and sendername for inbucket #2908

Merged
merged 3 commits into from
Nov 25, 2024
Merged
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
3 changes: 2 additions & 1 deletion internal/start/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,8 @@ EOF
env = append(env,
"GOTRUE_SMTP_HOST="+utils.InbucketId,
"GOTRUE_SMTP_PORT=2500",
"[email protected]",
fmt.Sprintf("GOTRUE_SMTP_ADMIN_EMAIL=%s", utils.Config.Inbucket.AdminEmail),
fmt.Sprintf("GOTRUE_SMTP_SENDER_NAME=%s", utils.Config.Inbucket.SenderName),
)
}

Expand Down
16 changes: 10 additions & 6 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,13 @@ type (
}

inbucket struct {
Enabled bool `toml:"enabled"`
Image string `toml:"-"`
Port uint16 `toml:"port"`
SmtpPort uint16 `toml:"smtp_port"`
Pop3Port uint16 `toml:"pop3_port"`
Enabled bool `toml:"enabled"`
Image string `toml:"-"`
Port uint16 `toml:"port"`
SmtpPort uint16 `toml:"smtp_port"`
Pop3Port uint16 `toml:"pop3_port"`
AdminEmail string `toml:"admin_email"`
SenderName string `toml:"sender_name"`
}

edgeRuntime struct {
Expand Down Expand Up @@ -327,7 +329,9 @@ func NewConfig(editors ...ConfigEditor) config {
JwtSecret: defaultJwtSecret,
},
Inbucket: inbucket{
Image: inbucketImage,
Image: inbucketImage,
AdminEmail: "[email protected]",
SenderName: "Admin",
},
Studio: studio{
Image: studioImage,
Expand Down
2 changes: 2 additions & 0 deletions pkg/config/templates/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ port = 54324
# Uncomment to expose additional ports for testing user applications that send emails.
# smtp_port = 54325
# pop3_port = 54326
# admin_email = "[email protected]"
# sender_name = "Admin"

[storage]
enabled = true
Expand Down