Skip to content

Conversation

@lunny
Copy link
Member

@lunny lunny commented Oct 26, 2020

Fix #13306

@lunny lunny added type/bug skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. labels Oct 26, 2020
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Oct 26, 2020
@lafriks lafriks added this to the 1.14.0 milestone Oct 26, 2020
Copy link
Contributor

@wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I applied this patch and tried sending the email, here's what I got

[gitea@nebula ~]$ gitea admin sendmail --config /etc/gitea/app.ini --title "[Test00] Gitea sendmail" --content "Please disregard thisemail as it is just a test of Gitea sendmail functionality."
2020/10/26 09:54:39 ...s/setting/setting.go:832:NewContext() [I] Default UI Location is Europe/Vienna
2020/10/26 09:54:39 ...dules/setting/git.go:91:newGit() [I] Git Version: 2.29.1.341.ge80a0c044a, Wire Protocol Version 2 Enabled
Proceed with sending email? [Y/n] y
Succseded: Was sent <!DOCTYPE html>
<html lang="en-US" class="theme-">
<head data-suburl="">
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta http-equiv="x-ua-compatible" content="ie=edge">
	<title>Internal Server Error -  git.MYDOMAIN.TLD </title>
	<link rel="manifest" href="/manifest.json" crossorigin="use-credentials">
	<meta name="theme-color" content="#782f59">
	<meta name="author" content="MYDOMAIN.TLD" />
	<meta name="description" content="git.MYDOMAIN.TLD Gitea instance by MYDOMAIN.TLD provided for fun as a hobby, with passion and love"/>
	<meta name="keywords" content="go,git,self-hosted,libre,golang,gitea">
	<meta name="referrer" content="no-referrer" />
	<meta name="_csrf" content="o9fyjFVqaM4GiwIOozs9nVA3sYE6MTYwMzcwMjQ4MzY1MTQ2MDI5MA" />




	<script>
		window.config = {
			AppVer: '1.14.0\u002bdev-91-g245597ab8',
			AppSubUrl: '',
			StaticUrlPrefix: '',
			UseServiceWorker:  true ,
			csrf: 'o9fyjFVqaM4GiwIOozs9nVA3sYE6MTYwMzcwMjQ4MzY1MTQ2MDI5MA',
			HighlightJS: false,
			SimpleMDE: false,
			Tribute: false,
			U2F: false,
			Heatmap: false,
			heatmapUser: null,
			NotificationSettings: {
				MinTimeout:  20000 ,
				TimeoutStep:   10000 ,
				MaxTimeout:  60000 ,
				EventSourceUpdateTime:  10000 ,
			},
			PageIsProjects: false,

		};
	</script>
	<link rel="icon" href="/img/favicon.svg" type="image/svg+xml">
	<link rel="alternate icon" href="/img/favicon.png" type="image/png">
	<link rel="mask-icon" href="/img/gitea-safari.svg" color="#609926">
	<link rel="fluid-icon" href="/img/gitea-lg.png" title="git.MYDOMAIN.TLD">

	<link rel="stylesheet" href="/css/index.css?v=ecd0cb9ecb8ba3904b86673f6741152e">
	<noscript>
		<style>
			.dropdown:hover > .menu { display: block; }
			.ui.secondary.menu .dropdown.item > .menu { margin-top: 0; }
		</style>
	</noscript>
	<style class="list-search-style"></style>

	<meta property="og:title" content="git.MYDOMAIN.TLD">
	<meta property="og:type" content="website" />
	<meta property="og:image" content="/img/gitea-lg.png" />
	<meta property="og:url" content="https://git.MYDOMAIN.TLD/" />
	<meta property="og:description" content="git.MYDOMAIN.TLD Gitea instance by MYDOMAIN.TLD provided for fun as a hobby, with passion and love">

<meta property="og:site_name" content="git.MYDOMAIN.TLD" />

	<link rel="stylesheet" href="/css/theme-42l-light.css?v=ecd0cb9ecb8ba3904b86673f6741152e">


</head>
<body>


	<div class="full height">
		<noscript>This website works better with JavaScript.</noscript>




			<div class="ui top secondary stackable main menu following bar light">
				<div class="ui container" id="navbar">
	<div class="item brand" style="justify-content: space-between;">
		<a href="/">
			<img class="ui mini image" src="/img/git.MYDOMAIN.TLD.svg" alt="git.MYDOMAIN.TLD icon">
		</a>
		<div class="ui basic icon button mobile-only" id="navbar-expand-toggle">
			<i class="sidebar icon"></i>
		</div>
	</div>

		<a class="item " href="/">Home</a>
		<a class="item " href="/explore/repos">Explore</a>





		<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">Help</a>
		<div class="right stackable menu">

				<a class="item" href="/user/sign_up">
					<svg viewBox="0 0 16 16" class="svg octicon-person" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M10.5 5a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm.061 3.073a4 4 0 10-5.123 0 6.004 6.004 0 00-3.431 5.142.75.750 001.498.07 4.5 4.5 0 018.99 0 .75.75 0 101.498-.07 6.005 6.005 0 00-3.432-5.142z"/></svg> Register
				</a>

			<a class="item" rel="nofollow" href="/user/login?redirect_to=%2fapi%2finternal%2fmail%2fsend">
				<svg viewBox="0 0 16 16" class="svg octicon-sign-in" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M2 2.75C2 1.784 2.784 1 3.75 1h2.5a.75.75 0 010 1.5h-2.5a.25.25 0 00-.25.25v10.5c0 .138.112.25.25.25h2.5a.75.750 010 1.5h-2.5A1.75 1.75 0 012 13.25V2.75zm6.56 4.5l1.97-1.97a.75.75 0 10-1.06-1.06L6.22 7.47a.75.75 0 000 1.06l3.25 3.25a.75.75 0 101.06-1.06L8.56 8.75h5.69a.75.75 0 000-1.5H8.56z"/></svg> Sign In
			</a>
		</div>

</div>

			</div>



<div class="ui container center">
	<p style="margin-top: 100px"><img class="ui centered image" src="/img/500.png" alt="500"/></p>
	<div class="ui divider"></div>
	<br>

	<p>Gitea Version: 1.14.0&#43;dev-91-g245597ab8</p>

</div>




	</div>



	<footer>
	<div class="ui container">
		<div class="ui left">
			Powered by Gitea Version: 1.14.0&#43;dev-91-g245597ab8 Page: <strong>4ms</strong> Template: <strong>0ms</strong>
		</div>
		<div class="ui right links">

			<div class="ui language bottom floating slide up dropdown link item">
				<svg viewBox="0 0 16 16" class="svg octicon-globe" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M1.543 7.25h2.733c.144-2.074.866-3.756 1.58-4.948.12-.197.237-.381.353-.552a6.506 6.506 0 00-4.666 5.5zm2.733 1.5H1.543a6.506 6.506 0 004.666 5.5 11.13 11.13 0 01-.352-.552c-.715-1.192-1.437-2.874-1.581-4.948zm1.504 0h4.44a9.637 9.637 0 01-1.363 4.177c-.306.51-.612.919-.857 1.215a9.978 9.978 0 01-.857-1.215A9.637 9.637 0 015.78 8.75zm4.44-1.5H5.78a9.637 9.637 0 011.363-4.177c.306-.51.612-.919.857-1.215.245.296.55.705.857 1.215A9.638 9.638 0 0110.22 7.25zm1.504 1.5c-.144 2.074-.866 3.756-1.58 4.948-.12.197-.237.381-.353.552a6.506 6.506 0 004.666-5.5h-2.733zm2.733-1.5h-2.733c-.144-2.074-.866-3.756-1.58-4.948a11.738 11.738 0 00-.353-.552 6.506 6.506 0 014.666 5.5zM8 0a8 8 0 100 16A8 8 0 008 0z"/></svg>
				<div class="text">en</div>
				<div class="menu">

						<a lang="en-US" class="item active selected" href="#">en</a>

				</div>
			</div>
			<a href="/js/licenses.txt">Licenses</a>
			<a href="/api/swagger">API</a>
			<a href="/ssh-hostkeys.txt" rel="noreferer">hostkeys</a>
<a href="https://status.MYDOMAIN.TLD/" rel="noopener">Status</a>
<a href="/MYDOMAIN.TLD" rel="noopener">&#183; MYDOMAIN.TLD &#183;</a>
<a href="https://MYDOMAIN.TLD/contact/" rel="noopener">Contact</a>
<a href="/0DD13DBC6B5433D3.asc" title="default signing key" rel="noopener">0DD13DBC6B5433D3</a>

			<span class="version">Go1.15.3</span>
		</div>
	</div>
</footer>

There are some 500s in the chunk above and the email hasn't arrived by now (test email from the admin dash arrives immediately) so I assume something's not right here.

edits: typo and link to the patch

@lunny lunny force-pushed the lunny/fix_send_mail branch from 168e6a0 to c7c253b Compare October 26, 2020 12:44
@lunny
Copy link
Member Author

lunny commented Oct 26, 2020

@wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf Thanks for your feedback, I have sent another commits, could you help to try again?

@codecov-io
Copy link

Codecov Report

Merging #13312 into master will increase coverage by 0.00%.
The diff coverage is 0.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #13312   +/-   ##
=======================================
  Coverage   42.11%   42.12%           
=======================================
  Files         689      689           
  Lines       75814    75832   +18     
=======================================
+ Hits        31932    31944   +12     
- Misses      38647    38653    +6     
  Partials     5235     5235           
Impacted Files Coverage Δ
cmd/mailer.go 0.00% <0.00%> (ø)
modules/private/mail.go 0.00% <0.00%> (ø)
routers/private/mail.go 0.00% <0.00%> (ø)
modules/util/timer.go 42.85% <0.00%> (-42.86%) ⬇️
modules/log/event.go 59.90% <0.00%> (+0.94%) ⬆️
modules/queue/workerpool.go 60.00% <0.00%> (+1.22%) ⬆️
services/pull/patch.go 55.68% <0.00%> (+1.70%) ⬆️
services/pull/check.go 51.82% <0.00%> (+2.91%) ⬆️
services/pull/temp_repo.go 29.78% <0.00%> (+3.19%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dbebc6b...c7c253b. Read the comment docs.

@wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf
Copy link
Contributor

@wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf Thanks for your feedback, I have sent another commits, could you help to try again?

Sure and thank you for the commits.
Give me a minute, please.

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Oct 26, 2020
@wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf
Copy link
Contributor

Alright the emails do arrive now 🚀

@techknowlogick techknowlogick merged commit 38d11ee into go-gitea:master Oct 26, 2020
@lunny lunny deleted the lunny/fix_send_mail branch October 27, 2020 01:57
ivanvc added a commit to ivanvc/gitea that referenced this pull request Oct 27, 2020
…s-stored-in-email-address-table

* origin/master:
  [UI] Hide consecutive additions and removals of the same label (go-gitea#13315)
  [skip ci] Updated translations via Crowdin
  Fix send mail (go-gitea#13312)
  [skip ci] Updated translations via Crowdin
  Deny wrong pull (go-gitea#13308)
  Group Label Changed Comments in timeline (go-gitea#13304)
  [skip ci] Updated translations via Crowdin
  Attempt to handle unready PR in tests (go-gitea#13305)
  go-gitea#12897 - add mastodon provider (go-gitea#13293)
  [skip ci] Updated translations via Crowdin
  Fix Storage mapping (go-gitea#13297)
  Update Mirror IsEmpty status on synchronize (go-gitea#13185)
  Fix bug isEnd detection on getIssues/getPullRequests (go-gitea#13299)
  systemd service: Add commented PATH environment option for Git prefix (go-gitea#13170)
  Sendmail command (go-gitea#13079)
  Various UI and arc-green fixes (go-gitea#13291)
@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

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gitea sendmail command fails mysteriously

7 participants