Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
67d0d2eeba |
No files matched your search
+2
-2
@@ -12,7 +12,7 @@ metadata:
|
||||
title: Courier
|
||||
description: Transaktionsmail für deine Apps über Amazon SES.
|
||||
icon: https://git.aimighty.olares.de/aimighty/courier/raw/branch/main/icon.png
|
||||
version: 26.11.22
|
||||
version: 26.11.23
|
||||
categories:
|
||||
- Applications
|
||||
|
||||
@@ -106,7 +106,7 @@ envs:
|
||||
default: "1000"
|
||||
|
||||
spec:
|
||||
versionName: '26.11.22'
|
||||
versionName: '26.11.23'
|
||||
fullDescription: |
|
||||
**Courier** ist ein kleiner Versanddienst für transaktionale E-Mails:
|
||||
eine Resend-kompatible HTTP-API, Warteschlange, Retry, Logs und
|
||||
|
||||
+2
-1
@@ -34,7 +34,7 @@ export type StoredPayload = {
|
||||
html?: string;
|
||||
text?: string;
|
||||
headers: Record<string, string>;
|
||||
attachments: { filename: string; content: string; content_type?: string }[];
|
||||
attachments: { filename: string; content: string; content_type?: string; content_id?: string }[];
|
||||
tags: { name: string; value: string }[];
|
||||
};
|
||||
|
||||
@@ -57,6 +57,7 @@ export function storedPayload(mail: NormalizedMail): StoredPayload {
|
||||
filename: item.filename,
|
||||
content: item.content.toString("base64"),
|
||||
content_type: item.contentType,
|
||||
content_id: item.contentId,
|
||||
})),
|
||||
tags: mail.tags,
|
||||
};
|
||||
|
||||
+8
-2
@@ -13,6 +13,7 @@ const attachmentInput = z.object({
|
||||
filename: z.string().min(1).max(255),
|
||||
content: z.string().min(1),
|
||||
content_type: z.string().min(3).max(200).optional(),
|
||||
content_id: z.string().min(1).max(200).optional(),
|
||||
});
|
||||
|
||||
export const sendSchema = z
|
||||
@@ -51,7 +52,7 @@ export type NormalizedMail = {
|
||||
html?: string;
|
||||
text?: string;
|
||||
headers: Record<string, string>;
|
||||
attachments: { filename: string; content: Buffer; contentType?: string }[];
|
||||
attachments: { filename: string; content: Buffer; contentType?: string; contentId?: string }[];
|
||||
tags: { name: string; value: string }[];
|
||||
};
|
||||
|
||||
@@ -105,7 +106,12 @@ export function normalizeMail(input: SendInput, fromDomain: string): NormalizedM
|
||||
const attachments = (input.attachments ?? []).map((item) => {
|
||||
const content = Buffer.from(item.content, "base64");
|
||||
if (content.length === 0) throw new MailValidationError("Leerer Anhang");
|
||||
return { filename: item.filename, content, contentType: item.content_type };
|
||||
return {
|
||||
filename: item.filename,
|
||||
content,
|
||||
contentType: item.content_type,
|
||||
contentId: item.content_id,
|
||||
};
|
||||
});
|
||||
const total = attachments.reduce((sum, item) => sum + item.content.length, 0);
|
||||
if (total > 10 * 1024 * 1024) {
|
||||
|
||||
@@ -27,6 +27,7 @@ function mimeOptions(payload: StoredPayload) {
|
||||
filename: item.filename,
|
||||
content: Buffer.from(item.content, "base64"),
|
||||
contentType: item.content_type,
|
||||
cid: item.content_id,
|
||||
})),
|
||||
};
|
||||
}
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@ apiVersion: v2
|
||||
name: courier
|
||||
description: Transaktionsmail-Gateway für hubsport.club über Amazon SES.
|
||||
type: application
|
||||
version: 26.11.22
|
||||
appVersion: "26.11.22"
|
||||
version: 26.11.23
|
||||
appVersion: "26.11.23"
|
||||
icon: https://git.aimighty.olares.de/aimighty/courier/raw/branch/main/icon.png
|
||||
home: https://git.aimighty.olares.de/aimighty/courier
|
||||
@@ -12,7 +12,7 @@ metadata:
|
||||
title: Courier
|
||||
description: Transaktionsmail für deine Apps über Amazon SES.
|
||||
icon: https://git.aimighty.olares.de/aimighty/courier/raw/branch/main/icon.png
|
||||
version: 26.11.22
|
||||
version: 26.11.23
|
||||
categories:
|
||||
- Applications
|
||||
|
||||
@@ -106,7 +106,7 @@ envs:
|
||||
default: "1000"
|
||||
|
||||
spec:
|
||||
versionName: '26.11.22'
|
||||
versionName: '26.11.23'
|
||||
fullDescription: |
|
||||
**Courier** ist ein kleiner Versanddienst für transaktionale E-Mails:
|
||||
eine Resend-kompatible HTTP-API, Warteschlange, Retry, Logs und
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "courier",
|
||||
"version": "26.11.22",
|
||||
"version": "26.11.23",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev -H 0.0.0.0 -p 3400",
|
||||
|
||||
Reference in new issue
Block a user