File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ exports.handler = (event) => {
5050
5151 } ) . then ( function ( container ) {
5252
53- return delete_the_email ( container ) ;
53+ return container ; // delete_the_email(container);
5454
5555 } ) . then ( function ( container ) {
5656
@@ -280,7 +280,13 @@ function extract_data(container)
280280 let from_account = tmp_from [ 0 ] ;
281281
282282 //
283- // 6. Create the path where the email needs to be moved
283+ // 6. S3 objects have a limit of how they they can be named
284+ // so we remove everything but...
285+ //
286+ container . subject = container . subject . replace ( / [ ^ a - z A - Z 0 - 9 & @ : , $ = + ? ; ] / g, "_" ) ;
287+
288+ //
289+ // 7. Create the path where the email needs to be moved
284290 // so it is properly organized.
285291 //
286292 let path = "Inbox/"
@@ -299,7 +305,7 @@ function extract_data(container)
299305 + "email.eml" ;
300306
301307 //
302- // 7 . Save the path for the next promise.
308+ // 8 . Save the path for the next promise.
303309 //
304310 container . path = path ;
305311
You can’t perform that action at this time.
0 commit comments