-
Notifications
You must be signed in to change notification settings - Fork 402
/
mail.go
104 lines (84 loc) · 3.17 KB
/
mail.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
// Copyright (C) 2022 Storj Labs, Inc.
// See LICENSE for copying information
package console
import "time"
// AccountActivationEmail is mailservice template with activation data.
type AccountActivationEmail struct {
Origin string
ActivationLink string
ContactInfoURL string
TermsAndConditionsURL string
}
// Template returns email template name.
func (*AccountActivationEmail) Template() string { return "Welcome" }
// Subject gets email subject.
func (*AccountActivationEmail) Subject() string { return "Activate your email" }
// ForgotPasswordEmail is mailservice template with reset password data.
type ForgotPasswordEmail struct {
Origin string
UserName string
ResetLink string
CancelPasswordRecoveryLink string
LetUsKnowURL string
ContactInfoURL string
TermsAndConditionsURL string
}
// Template returns email template name.
func (*ForgotPasswordEmail) Template() string { return "Forgot" }
// Subject gets email subject.
func (*ForgotPasswordEmail) Subject() string { return "Password recovery request" }
// ProjectInvitationEmail is mailservice template for project invitation email.
type ProjectInvitationEmail struct {
Origin string
UserName string
InviterEmail string
SignInLink string
LetUsKnowURL string
ContactInfoURL string
TermsAndConditionsURL string
}
// Template returns email template name.
func (*ProjectInvitationEmail) Template() string { return "Invite" }
// Subject gets email subject.
func (email *ProjectInvitationEmail) Subject() string {
return "You were invited to join a project on Storj"
}
// UnknownResetPasswordEmail is mailservice template with unknown password reset data.
type UnknownResetPasswordEmail struct {
Satellite string
Email string
DoubleCheckLink string
ResetPasswordLink string
CreateAnAccountLink string
SupportTeamLink string
}
// Template returns email template name.
func (*UnknownResetPasswordEmail) Template() string { return "UnknownReset" }
// Subject gets email subject.
func (*UnknownResetPasswordEmail) Subject() string {
return "You have requested to reset your password, but..."
}
// AccountAlreadyExistsEmail is mailservice template for email where user tries to create account, but one already exists.
type AccountAlreadyExistsEmail struct {
Origin string
SatelliteName string
SignInLink string
ResetPasswordLink string
CreateAccountLink string
}
// Template returns email template name.
func (*AccountAlreadyExistsEmail) Template() string { return "AccountAlreadyExists" }
// Subject gets email subject.
func (*AccountAlreadyExistsEmail) Subject() string {
return "Are you trying to sign in?"
}
// LockAccountEmail is mailservice template with lock account data.
type LockAccountEmail struct {
Name string
LockoutDuration time.Duration
ResetPasswordLink string
}
// Template returns email template name.
func (*LockAccountEmail) Template() string { return "LockAccount" }
// Subject gets email subject.
func (*LockAccountEmail) Subject() string { return "Account Lock" }