🎉 monetr is going live in January of 2025!

Email/SMTP Configuration

monetr supports sending email notifications (and email verification) if SMTP is configured. Currently emails can be sent when a user creates a new account, forgets their password, or changes their password.

All email features require that enabled is set to true and a valid smtp config is provided. monetr does not support specific email APIs and has no plans to. Several email providers offer an SMTP relay, this is monetr’s preferred method of sending emails as it is the most flexible.

Below is an example of the email/SMTP configuration block:

config.yaml
email:
  enabled: true
  domain: "example.com"
  verification: { ... }   # Email verification configuration
  forgotPassword: { ... } # Password reset via email link
  smtp: { ... }           # SMTP configuration
NameTypeDefaultDescription
enabledBooleanfalseAre email notifications enabled on this server?
domainStringEmail domain used to send emails, emails will always be sent from no-reply@{DOMAIN}.

Email Verification Configuration

If you want to require users to verify their email address when they create a new login on monetr, you can enable email verification. This will email users a link that they must click after creating their login, the link’s lifetime can be customized if needed.

An example of the email verification config:

config.yaml
email:
  verification:
    enabled: true      # Can be true or false
    tokenLifetime: 10m # Duration that the verification link should be valid

The token lifetime is parsed using time.ParseDuration(...), any value that can be parsed using that function is a valid configuration value.

NameTypeDefaultDescription
enabledBooleanfalseIs email verification enabled/required on this server?
tokenLifetimeDuration10mHow long should the link in the verification email be valid?

Forgot Password Configuration

If you ever lose your password and need to reset it, the easiest way is by using the forgot password form. This will send an email to the user (if a user with that email exists) that includes a link to reset their password. Similar to the Email Verification Configuration, this also only requires an enabled and tokenLifetime value.

Example of the forgot password configuration:

config.yaml
email:
  forgotPassword:
    enabled: true      # Can be true or false
    tokenLifetime: 10m # Duration that the password reset link should be valid
NameTypeDefaultDescription
enabledBooleanfalseAre users allowed to reset their password via forgot password?
tokenLifetimeDuration10mHow long should the password reset link be valid?

SMTP Configuration

monetr only supports PLAIN SMTP authentication at this time. You can obtain all of the necessary details from your preferred email provider.

monetr’s SMTP implementation requires TLS. Your email provider must support TLS on whatever port specified below.

config.yaml
email:
  smtp:
    identity: "..." # SMTP Identity
    username: "..." # SMTP Username
    password: "..." # SMTP Password or app password depending on provider
    host: "..."     # Domain name of the SMTP server, no protocol or port specified
    port: 587       # Use the port specified by your provider, could be 587, 465 or 25