Skip to content

Instance setting for extra email text #5612

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

Open
Nutomic opened this issue Apr 10, 2025 · 3 comments
Open

Instance setting for extra email text #5612

Nutomic opened this issue Apr 10, 2025 · 3 comments
Labels
area: email enhancement New feature or request

Comments

@Nutomic
Copy link
Member

Nutomic commented Apr 10, 2025

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 Nutomic added area: email enhancement New feature or request labels Apr 10, 2025
@MrKaplan-lw
Copy link

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:info@lemmy.world">info@lemmy.world</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:info@lemmy.world">info@lemmy.world</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
Copy link

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: info@lemmy.world - 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: [info@lemmy.world](mailto:info@lemmy.world) - Web: [https://lemmy.world](https://lemmy.world/)

@Nutomic
Copy link
Member Author

Nutomic commented Apr 25, 2025

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 #5641 to call markdown_to_html on the reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: email enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants