This repository contains some of the common emails which would be sent to users of the Openlane platform.
// setup config using options
config, err := emailtemplates.New(
emailtemplates.WithCompanyName("Avengers"),
emailtemplates.WithCompanyAddress("1337 Main St. ·Metropolis, NY 10010"),
emailtemplates.WithCorporation("avengers, Inc."),
emailtemplates.WithSupportEmail("support@avengers.com"),
emailtemplates.WithFromEmail("no-reply@mail.avengers.com"),
emailtemplates.WithRootDomain("https://www.avengers.com"),
emailtemplates.WithDocsDomain("https://docs.avengers.com"),
emailtemplates.WithProductDomain("https://console.avengers.com"),
)
if err != nil {
return err
}
// create email message
email, err := config.NewWelcomeEmail(
emailtemplates.Recipient{
Email: "ironman@example.com",
FirstName: "Tony",
LastName: "Stark",
}, "Avengers",
)
if err != nil {
return err
}
// we recommend the use of the https://github.com/theopenlane/newman package to send the email
// which supports several providers including Resend, Mailgun, etc.
// for brevity, this won't show how to create the client and assumes it was created beforehand
if err := newmanClient.SendEmailWithContext(ctx, email); err != nil {
return err
}
Variable | Example |
---|---|
.CompanyName |
Openlane |
.CompanyAddress |
1337 Main St. ·Metropolis, NY 10010 |
.Corporation |
theopenlane, Inc. |
.SupportEmail |
support@theopenlane.io |
.FromEmail |
no-reply@mail.theopenlane.io |
.URLS.Root |
https://theopenlane.io |
.URLS.Product |
https://console.theopenlane.io |
.URLS.Docs |
https://docs.theopenlane.io |
Template Name | Variable | Example Value |
---|---|---|
Email Verification | .URLS.Verify |
https://console.theopenlane.io/verify |
Subscriber Verification | .URLS.VerifySubscriber |
https://theopenlane.io/verify |
Password Reset | .URLS.PasswordReset |
https://console.theopenlane.io/password-reset |
Invite Acceptance | .URLS.Invite |
https://console.theopenlane.io/invite |
Variable | Example |
---|---|
.LogoURL |
http://api.example.com/assets/logo.png |
These are the actual emails, language, format, that will be sent to users of Openlane platform so please exercise care with their updates. If you're uncertain, feel free to reach out to @matoszz for assistance.
See the contributing guide for more information