feat: add configurable sender name and allow users to choose between system and personal SMTP accounts when sending emails
Build and Push Multi-Platform Images / build-and-push (push) Successful in 34s
Build and Push Multi-Platform Images / build-and-push (push) Successful in 34s
This commit is contained in:
@@ -120,6 +120,7 @@ export const inboxApi = {
|
||||
body: string;
|
||||
html?: string;
|
||||
segments: { pages: number[]; filename: string }[];
|
||||
sender?: string;
|
||||
},
|
||||
) =>
|
||||
api.post(`/api/inbox/${encodeURIComponent(id)}/send-email`, body).then(() => {}),
|
||||
|
||||
@@ -7,9 +7,15 @@ export interface UserSettingsData {
|
||||
smtpUser: string | null;
|
||||
smtpPassSet: boolean;
|
||||
smtpFrom: string | null;
|
||||
smtpFromName: string | null;
|
||||
mailSignatureHtml: string | null;
|
||||
}
|
||||
|
||||
export interface SenderOption {
|
||||
id: string;
|
||||
label: string;
|
||||
}
|
||||
|
||||
export const userSettingsApi = {
|
||||
get: () => api.get<UserSettingsData>('/api/user-settings').then((r) => r.data),
|
||||
|
||||
@@ -20,4 +26,7 @@ export const userSettingsApi = {
|
||||
api
|
||||
.post<{ ok: boolean; error?: string }>('/api/user-settings/test-smtp', cfg)
|
||||
.then((r) => r.data),
|
||||
|
||||
getSenders: () =>
|
||||
api.get<SenderOption[]>('/api/user-settings/senders').then((r) => r.data),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user