File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
components/resend/actions/send-email Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments