Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testmail produces 500 Internal Server Error #2472

Closed
2 of 7 tasks
davidmehren opened this issue Sep 7, 2017 · 0 comments · Fixed by #2479
Closed
2 of 7 tasks

Testmail produces 500 Internal Server Error #2472

davidmehren opened this issue Sep 7, 2017 · 0 comments · Fixed by #2479
Labels
Milestone

Comments

@davidmehren
Copy link

Description

When trying to send a test mail via the admin interface (/admin/config which uses /admin/config/test_mail), Gitea responds with a 500 Internal Server Error.
I'm not an expert in Go, but I believe this is because the testmail body from

return gomail.Send(mailer.Sender, mailer.NewMessage([]string{email}, "Gitea Test Email!", "Gitea Test Email!").Message)
is not 100 characters long and so the array slice operation in
if strings.Contains(body[:100], "<html>") {
fails.
You can find the stacktrace in the log gist.

@lafriks lafriks added this to the 1.x.x milestone Sep 7, 2017
@lunny lunny modified the milestones: 1.3.0, 1.x.x Sep 11, 2017
@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants