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:
@@ -203,11 +203,14 @@ export class InboxController {
|
||||
body: string;
|
||||
html?: string;
|
||||
segments: { pages: number[]; filename: string }[];
|
||||
sender?: string;
|
||||
},
|
||||
@Request() req: any,
|
||||
): Promise<void> {
|
||||
const preferredUsername: string | null = req.user?.preferredUsername ?? null;
|
||||
const smtpOverride = await this.userSettingsService.getSmtpConfig(req.user.userId);
|
||||
const smtpOverride = body.sender === 'user'
|
||||
? await this.userSettingsService.getSmtpConfig(req.user.userId)
|
||||
: null;
|
||||
await this.inboxService.sendAsEmail(id, preferredUsername, {
|
||||
...body,
|
||||
smtpOverride: smtpOverride ?? undefined,
|
||||
|
||||
Reference in New Issue
Block a user