Spacebar can be configured to send email, to enable the following functionality:
- Email verification
- Password resets
- Password change notifications
Spacebar supports the following email transports:
Once you have an account with one of the above services, or an SMTP service, you can begin configuring Spacebar to send mail.
You must edit:
general_frontPageconfig value, used to generate verification/password reset links. Be sure to set it to the Spacebar web app URL. For example,
general_correspondenceEmailconfig value, used as the 'from' email address. If unset,
noreply@localhostis used, which will most likely throw an error with your email service.
- By default users are automatically verified. To change this, update the
defaults_user_verifiedconfig value to
- If you would like users to be forced to verify their email before using the service, set the
- You may force users to pass a CAPTCHA before requesting a password reset by setting
|email_smtp_host||string||SMTP Host for sending email|
|email_smtp_secure||boolean||Use TLS for SMTP|
|email_mailgun_apiKey||string||Mailgun API key|
|email_mailjet_apiKey||string||Mailjet API key|
|email_mailjet_apiSecret||string||Mailjet API secret|
|email_sendgrid_apiKey||string||Sendgrid API key|
Spacebar's email templates are stored in
They are simple HTML files, which you may edit freely. Although HTML mail is very restricted, so a lot of content may not render properly.
Below are the available strings replaced in mail templates.
||The username of the user this email is being sent to|
||The discriminator of the user this email is being sent to|
||The ID of the user this email is being sent to|
||The last 4 digits of the user's phone number.|
||The user's email address|
||The generated password reset or email verification link|
||The IP address of new login (New login emails are not currently implemented)|
||The GeoIP city of new login|
||The GeoIP region of new login|
||The GeoIP country of new login|