Skip to content

Commit ec03a8e

Browse files
committed
updates
1 parent 137b88f commit ec03a8e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

components/resend/actions/send-email/send-email.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export default defineAction({
102102
const buffer = await this.streamToBuffer(stream);
103103
const base64 = buffer.toString("base64");
104104
attachments.push({
105-
name: metadata.name,
105+
filename: metadata.name,
106106
content: base64,
107107
});
108108
}
@@ -112,10 +112,10 @@ export default defineAction({
112112
if (attachmentsBase64.length !== base64AttachmentFilenames.length) {
113113
throw new ConfigurationError("The number of base64-encoded attachments must match the number of base64-encoded attachment filenames");
114114
}
115-
for (let i = 1; i <= attachmentsBase64.length; i++) {
115+
for (let i = 0; i < attachmentsBase64.length; i++) {
116116
attachments.push({
117-
name: base64AttachmentFilenames[i - 1],
118-
content: attachmentsBase64[i - 1],
117+
filename: base64AttachmentFilenames[i],
118+
content: attachmentsBase64[i],
119119
});
120120
}
121121
}

0 commit comments

Comments
 (0)