mirror of
https://github.com/wassname/talk.git
synced 2026-07-15 11:26:58 +08:00
[CORL-943] Send test emails (#2882)
* add smtp test email * disable button if email not enabled * add error handling * internationalize strings * sort imports
This commit is contained in:
@@ -3,6 +3,15 @@ interface EmailTemplate<T extends string, U extends {}> {
|
||||
context: U;
|
||||
}
|
||||
|
||||
type TestContext<T extends string, U extends {}> = EmailTemplate<T, U>;
|
||||
|
||||
export type SMTPTestTemplate = TestContext<
|
||||
"test/smtp-test",
|
||||
{
|
||||
email: string;
|
||||
}
|
||||
>;
|
||||
|
||||
/**
|
||||
* NotificationContext
|
||||
*/
|
||||
@@ -203,6 +212,7 @@ type Templates =
|
||||
| OnFeaturedTemplate
|
||||
| DigestTemplate
|
||||
| OnCommentRejectedTemplate
|
||||
| SMTPTestTemplate
|
||||
| OnCommentApprovedTemplate;
|
||||
|
||||
export { Templates as EmailTemplate };
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
{% extends "layouts/base.html" %} {% block content %}
|
||||
<div
|
||||
data-l10n-id="email-template-testSmtpTest"
|
||||
data-l10n-args="{{ context | dump }}"
|
||||
>
|
||||
This is a test email sent to {{ context.email }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user