lemmy icon indicating copy to clipboard operation
lemmy copied to clipboard

Instance setting for extra email text

Open Nutomic opened this issue 9 months ago • 3 comments

Some instances like lemmy.zip and lemmy.world send custom registration emails which include info like support email address and appeals pathways. It would be reasonable to specify these directly in Lemmy as a text field on /admin page and stored in local_site, so that it gets included in emails automatically.

Nutomic avatar Apr 10 '25 07:04 Nutomic

we currently have two different templates that we use to send rejected application emails.

when a user signs up with a disposable or banned email address we're sending this:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Lemmy.World registration application denied</title>
</head>
<body>
<h2>Hello {user_name},</h2>
<p>your Lemmy.World account was automatically deleted for using a disallowed email address.</p>
<p>Due to technical limitations, this check is currently only performed after successful email verification.</p>
<p>
    Best regards,<br/>
    Lemmy.World Support
</p>
<p>
   <b>Email: <a href="mailto:[email protected]">[email protected]</a> - Web: <a href="https://lemmy.world/">https://lemmy.world</a></b>
</p>
</body>
</html>

For incorrect application texts we send this:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Lemmy.World registration application denied</title>
</head>
<body>
<h2>Hello {user_name},</h2>
<p>your account was automatically deleted due to not agreeing to our terms of service.</p>
<p>You have to provide the exact words stated on the signup page, excluding the surrounding quotes.</p>
<p>Feel free to sign up again, your username is available again.</p>
<p>Due to technical limitations, this check is currently only performed after successful email verification.</p>
<p>
    Best regards,<br/>
    Lemmy.World Support
</p>
<p>
   <b>Email: <a href="mailto:[email protected]">[email protected]</a> - Web: <a href="https://lemmy.world/">https://lemmy.world</a></b>
</p>
</body>
</html>

In the longer term future, these are likely both things that we could migrate to the 1.0 plugin system and have sign-up attempts intercepted on submission rather than after the initial signup was created, then we wouldn't need to send these as emails anymore.

To be honest, the built-in notification template may be enough us, but we haven't tested this yet to see how this works out with formatted text. Our applications are automatically processed, so it wouldn't be an issue for us to adjust the text that gets put into the rejection reason.

MrKaplan-lw avatar Apr 14 '25 17:04 MrKaplan-lw

The current format of emails sent for denied applications does not work with reasons in multiple lines, it looks like this:

Your registration application for dev.lemmy.world has been denied. The following reason was provided:

"Your Lemmy.World account was automatically deleted for using a disallowed email address. Due to technical limitations, this check is currently only performed after successful email verification. Best regards, Lemmy.World Support Email: [email protected] - Web: https://lemmy.world"

The reason text was

Your Lemmy.World account was automatically deleted for using a disallowed email address.

Due to technical limitations, this check is currently only performed after successful email verification.

Best regards,  
Lemmy.World Support

Email: [[email protected]](mailto:[email protected]) - Web: [https://lemmy.world](https://lemmy.world/)

MrKaplan-lw avatar Apr 20 '25 12:04 MrKaplan-lw

The current format of emails sent for denied applications does not work with reasons in multiple lines, it looks like this:

Thats because its inserting plaintext into html. I changed it in https://github.com/LemmyNet/lemmy/pull/5641 to call markdown_to_html on the reason.

Nutomic avatar Apr 25 '25 10:04 Nutomic