Skip to content

Gitea sendmail command fails mysteriously #13306

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

Closed
4 tasks done
wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf opened this issue Oct 25, 2020 · 4 comments · Fixed by #13312
Closed
4 tasks done

Gitea sendmail command fails mysteriously #13306

wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf opened this issue Oct 25, 2020 · 4 comments · Fixed by #13312
Labels
Milestone

Comments

@wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf
Copy link
Contributor

  • Gitea version (or commit ref): 1.14.0+dev-84-ge2740b32b
  • Git version: git version 2.29.1.341.ge80a0c044a
  • Operating system: Arch Linux
  • Built from source
    • Yes
  • Run with
    • systemd
  • Database:
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • No

Description

I have been testing the recently introduced sendmail functionality and my instance doesn't want to proceed with the following error

[gitea@nebula ~]$ gitea admin sendmail --title "[Test] Gitea sendmail" --content "Please disregard this email as it is just a test of Gitea sendmail functionality."
Proceed with sending email? [Y/n] y
error: Unable to contact gitea: Post "api/internal/mail/send": unsupported protocol scheme ""

The error does not disappear even when I explicitly point the command to a valid config, which does have the data necessary to speak to Gitea and are apparently missing in the POST request being sent out (namely protocol scheme and app URL), as documented below

[gitea@nebula ~]$ gitea admin sendmail --config /etc/gitea/app.ini --title "[Test] Gitea sendmail" --content "Please disregard this email as it is just a test of Gitea sendmail functionality."
Proceed with sending email? [Y/n] y
error: Unable to contact gitea: Post "api/internal/mail/send": unsupported protocol scheme ""

Also, logs (set to debug) with gitea in dev mode don't yield anything.

@lunny
Copy link
Member

lunny commented Oct 26, 2020

Please confirm your app.ini LOCAL_ROOT_URL on [server] has set correct value. In fact, once the error occupied, your gitea instance should not work normally.

@lunny lunny mentioned this issue Oct 26, 2020
@lafriks lafriks added this to the 1.14.0 milestone Oct 26, 2020
@wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf
Copy link
Contributor Author

Please confirm your app.ini LOCAL_ROOT_URL on [server] has set correct value. In fact, once the error occupied, your gitea instance should not work normally.

In fact I think it's set to the default value
image

@lunny
Copy link
Member

lunny commented Oct 26, 2020

@wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf Please see #13312

@wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf
Copy link
Contributor Author

@wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf Please see #13312

Thanks.
I applied the patch you wrote and left a comment there - the emails are still not going through.

@go-gitea go-gitea locked and limited conversation to collaborators Dec 14, 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