diff --git a/client/basic/client.ts b/client/basic/client.ts index 68713b8..03d6a24 100644 --- a/client/basic/client.ts +++ b/client/basic/client.ts @@ -259,6 +259,12 @@ export class SMTPClient { "name=" + attachment.filename, ); + if (attachment.contentID) { + await this.#connection.writeCmd( + `Content-ID: <${attachment.contentID}>`, + ); + } + await this.#connection.writeCmd( "Content-Disposition: attachment; filename=" + attachment.filename, ); diff --git a/config/mail/attachments.ts b/config/mail/attachments.ts index 9bbe69e..95c9ba3 100644 --- a/config/mail/attachments.ts +++ b/config/mail/attachments.ts @@ -3,6 +3,7 @@ import { base64Encode } from "./encoding.ts"; interface baseAttachment { contentType: string; filename: string; + contentID?: string | number; } export type Attachment =