@@ -83,24 +83,24 @@ export class SMTPClient {
8383 this . #connection. writeCmd (
8484 `Content-Type: ${ attachment . contentType } ; name=${ attachment . filename } ` ,
8585 ) ;
86-
86+
8787 if ( attachment . contentID ) {
8888 this . #connection. writeCmd (
8989 `Content-ID: <${ attachment . contentID } >` ,
9090 ) ;
9191 }
92-
92+
9393 this . #connection. writeCmd (
9494 `Content-Disposition: ${
9595 attachment . contentDisposition || "attachment"
9696 } ; filename=${ attachment . filename } `,
9797 ) ;
98-
98+
9999 if ( attachment . encoding === "base64" ) {
100100 this . #connection. writeCmd (
101101 "Content-Transfer-Encoding: base64\r\n" ,
102102 ) ;
103-
103+
104104 for (
105105 let line = 0 ;
106106 line < Math . ceil ( attachment . content . length / 75 ) ;
@@ -110,16 +110,16 @@ export class SMTPClient {
110110 line * 75 ,
111111 ( line + 1 ) * 75 ,
112112 ) ;
113-
113+
114114 this . #connection. writeCmd ( lineOfBase64 ) ;
115115 }
116-
116+
117117 this . #connection. writeCmd ( "\r\n" ) ;
118118 } else if ( attachment . encoding === "text" ) {
119119 this . #connection. writeCmd (
120120 "Content-Transfer-Encoding: quoted-printable\r\n" ,
121121 ) ;
122-
122+
123123 this . #connection. writeCmd ( attachment . content + "\r\n" ) ;
124124 }
125125 }
@@ -287,20 +287,20 @@ export class SMTPClient {
287287 content . relatedAttachments . map ( ( v ) => v . content ) . join ( "\n" ) ,
288288 new RegExp ( "--related([0-9]+)" , "g" ) ,
289289 ) ;
290-
290+
291291 const relatedBoundary = `related${ boundaryAddRel } ` ;
292292 this . #connection. writeCmd (
293293 `Content-Type: multipart/related; boundary=${ relatedBoundary } \r\n; type=${ content . mimeType } ` ,
294294 ) ;
295-
295+
296296 this . #connection. writeCmd ( `--${ relatedBoundary } ` ) ;
297297 this . encodeContent ( content ) ;
298-
298+
299299 for ( let i = 0 ; i < content . relatedAttachments . length ; i ++ ) {
300300 this . #connection. writeCmd ( `--${ relatedBoundary } ` ) ;
301301 this . encodeAttachment ( content . relatedAttachments [ i ] ) ;
302302 }
303-
303+
304304 this . #connection. writeCmd ( `--${ relatedBoundary } --\r\n` ) ;
305305 }
306306
0 commit comments