Skip to content

armgit / fider

Public Imported from GitHub
0

Open platform to collect and prioritize feedback

Remove the welcome email.

Matt Roberts1661c0aeaefd
diff --git a/app/handlers/signup.go b/app/handlers/signup.go
index e6dcdcdb1..3d3b5c1a9 100644
--- a/app/handlers/signup.go
+++ b/app/handlers/signup.go
@@ -117,10 +117,6 @@ func CreateTenant() web.HandlerFunc {
c.Enqueue(tasks.SendSignUpEmail(action, siteURL))
}
- if status == enum.TenantActive && user.Email != "" {
- c.Enqueue(tasks.SendWelcomeEmail(user.Name, user.Email, siteURL))
- }
-
// Handle userlist.
if env.Config.UserList.Enabled {
c.Enqueue(tasks.UserListCreateCompany(*createTenant.Result, *user))
@@ -197,8 +193,6 @@ func VerifySignUpKey() web.HandlerFunc {
webutil.AddAuthUserCookie(c, user)
- c.Enqueue(tasks.SendWelcomeEmail(user.Name, user.Email, c.BaseURL()))
-
return c.Redirect(c.BaseURL())
}
}
diff --git a/app/tasks/signup.go b/app/tasks/signup.go
index 5b655896b..0827d8101 100644
--- a/app/tasks/signup.go
+++ b/app/tasks/signup.go
@@ -5,7 +5,6 @@ import (
"github.com/getfider/fider/app/models/cmd"
"github.com/getfider/fider/app/models/dto"
"github.com/getfider/fider/app/pkg/bus"
- "github.com/getfider/fider/app/pkg/env"
"github.com/getfider/fider/app/pkg/web"
"github.com/getfider/fider/app/pkg/worker"
)
@@ -29,32 +28,3 @@ func SendSignUpEmail(action *actions.CreateTenant, baseURL string) worker.Task {
return nil
})
}
-
-// SendWelcomeEmail is used to send a welcome email to new tenant admin
-// This email is not sent on self hosted instaces
-func SendWelcomeEmail(name, email, baseURL string) worker.Task {
- return describe("Send welcome email", func(c *worker.Context) error {
- if env.IsSingleHostMode() {
- return nil
- }
-
- to := dto.NewRecipient(name, email, dto.Props{
- "name": name,
- "url": link(baseURL, "/"),
- })
-
- bus.Publish(c, &cmd.SendMail{
- From: dto.Recipient{
- Name: "Fider",
- Address: "[email protected]",
- },
- To: []dto.Recipient{to},
- TemplateName: "welcome_email",
- Props: dto.Props{
- "logo": web.LogoURL(c),
- },
- })
-
- return nil
- })
-}
diff --git a/views/email/welcome_email.html b/views/email/welcome_email.html
deleted file mode 100644
index 5a993f261..000000000
--- a/views/email/welcome_email.html
+++ /dev/null
@@ -1,24 +0,0 @@
-{{define "subject"}}Welcome to Fider! πŸ‘‹{{end}}
-
-{{define "body"}}
-<tr>
- <td style="color:#1c262d">
- <h2>Hey {{ .name }} πŸ‘‹,</h2>
- <p>Thanks for giving Fider a go.</p>
- <p>You can now start collecting ideas and suggestions from your customers and clients without hassle.</p>
- <p>Reach out to your audience and invite them to join in by sharing this link through email, Facebook, Twitter or any other platform they may be on.</p>
- <p></p>
- <p>πŸ‘‰ {{ .url | html }}</p>
- <p></p>
- <p>I'm here to support you in any way I can, let me know if you have any questions or need help with something.</p>
- <p></p>
- <p>
- Best,
- <br/>
- Guilherme
- <br/>
- Founder Β· Fider.io
- </p>
- </td>
-</tr>
-{{end}}
\ No newline at end of file