mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-23 15:19:41 +02:00
Feature/email support (#720)
* feat(frontend): ✨ add UI for testing email configuration * feat(backend): ✨ add email service with common templates (WIP) * test(backend): ✅ add basic tests for email configuration * set defaults * add email variables Co-authored-by: Hayden <hay-kot@pm.me>
This commit is contained in:
parent
c0dd07f9e7
commit
b7b8aa9a08
20 changed files with 1168 additions and 61 deletions
28
frontend/api/class-interfaces/email.ts
Normal file
28
frontend/api/class-interfaces/email.ts
Normal file
|
@ -0,0 +1,28 @@
|
|||
import { BaseAPI } from "./_base";
|
||||
|
||||
const routes = {
|
||||
base: "/api/admin/email",
|
||||
};
|
||||
|
||||
export interface CheckEmailResponse {
|
||||
ready: boolean;
|
||||
}
|
||||
|
||||
export interface TestEmailResponse {
|
||||
success: boolean;
|
||||
error: string;
|
||||
}
|
||||
|
||||
export interface TestEmailPayload {
|
||||
email: string;
|
||||
}
|
||||
|
||||
export class EmailAPI extends BaseAPI {
|
||||
check() {
|
||||
return this.requests.get<CheckEmailResponse>(routes.base);
|
||||
}
|
||||
|
||||
test(payload: TestEmailPayload) {
|
||||
return this.requests.post<TestEmailResponse>(routes.base, payload);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue