Forgejo/services/mailer
Aravinth Manivannan ac889d4290 [GITEA] notifies admins on new user registration (squash) fix URL
## Changes:

1. Use absolute URL in the admin panel link sent on new registrations
2. Include absolute URL of the newly signed-up user's profile.

New email looks like this:

<details><summary>Please click to expand</summary>

```
--153937b1864f158f4fd145c4b5d4a513568681dd489021dd466a8ad7b770
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8

User Information: @realaravinth ( http://localhost:3000/realaravinth )
----------------------------------------------------------------------

* Created: 2023-12-13 19:36:50 +05:30

Please click here ( http://localhost:3000/admin/users/9 ) to manage the use=
r from the admin panel.
--153937b1864f158f4fd145c4b5d4a513568681dd489021dd466a8ad7b770
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=UTF-8

<!DOCTYPE html>
<html>
<head>
	<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8">
	<title>New user realaravinth just signed up</title>

	<style>
		blockquote { padding-left: 1em; margin: 1em 0; border-left: 1px solid gre=
y; color: #777}
		.footer { font-size:small; color:#666;}
	</style>

</head>

<body>
	<ul>
		<h3>User Information: <a href=3D"http://localhost:3000/realaravinth">@rea=
laravinth</a></h3>
		<li>Created: <relative-time format=3D"datetime" weekday=3D"" year=3D"nume=
ric" month=3D"short" day=3D"numeric" hour=3D"numeric" minute=3D"numeric" se=
cond=3D"numeric" datetime=3D"2023-12-13T19:36:50+05:30">2023-12-13 19:36:50=
 +05:30</relative-time></li>
	</ul>
	<p> Please <a href=3D"http://localhost:3000/admin/users/9" rel=3D"nofollow=
">click here</a> to manage the user from the admin panel. </p>
</body>
</html>

--153937b1864f158f4fd145c4b5d4a513568681dd489021dd466a8ad7b770--
```

</details>

fixes: https://codeberg.org/forgejo/forgejo/issues/1927
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/1940
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Aravinth Manivannan <realaravinth@batsense.net>
Co-committed-by: Aravinth Manivannan <realaravinth@batsense.net>
(cherry picked from commit b8d764e36a)
2023-12-24 14:41:12 +00:00
..
incoming Next round of db.DefaultContext refactor (#27089) 2023-09-16 14:39:12 +00:00
token [GITEA] Drop sha256-simd in favor of stdlib 2023-11-13 14:06:31 +01:00
mail.go [BRANDING] add X-Forgejo-* headers 2023-11-13 13:58:18 +01:00
mail_admin_new_user.go [GITEA] notifies admins on new user registration (squash) fix URL 2023-12-24 14:41:12 +00:00
mail_admin_new_user_test.go [GITEA] notifies admins on new user registration (squash) fix URL 2023-12-24 14:41:12 +00:00
mail_comment.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
mail_issue.go Clean up template locale usage (#27856) (#27857) 2023-10-31 17:35:55 +01:00
mail_release.go Clean up template locale usage (#27856) (#27857) 2023-10-31 17:35:55 +01:00
mail_repo.go Clean up template locale usage (#27856) (#27857) 2023-10-31 17:35:55 +01:00
mail_team_invite.go Clean up template locale usage (#27856) (#27857) 2023-10-31 17:35:55 +01:00
mail_test.go Add support for incoming emails (#22056) 2023-01-14 23:57:10 +08:00
mailer.go Clean up template locale usage (#27856) (#27857) 2023-10-31 17:35:55 +01:00
mailer_test.go Prevent multiple To recipients (#22566) 2023-01-22 08:23:52 -06:00
main_test.go move repository deletion to service layer (#26948) 2023-09-08 04:51:15 +00:00
notify.go [GITEA] notifies admins on new user registration 2023-11-13 14:06:27 +01:00