rob-luke / emails-html-to-pdf

Convert emails without attachments to pdf and send as email
32 stars 7 forks source link

Non-standard characters break file naming #1

Closed bjnoel closed 2 years ago

bjnoel commented 2 years ago

I setup a forward to move my html only emails to an email address that this script processes. The colon in the subject line (Fwd:) breaks the file naming because files cannot contain non-standard characters, the file is saved simply as "Fwd".

rob-luke commented 2 years ago

Ah damnit. Good catch. Would it be ok just to remove these non-standard characters? Are there any additional characters to : that we should consider?

bjnoel commented 2 years ago

I think: \/*?:"<>|

rob-luke commented 2 years ago

I think this is now fixed. Could you please confirm

smseidl commented 2 years ago

@rob-luke - I had some yesterday that did not work... examples: "Your statement is available – Reference: 4564944U06218667" - I think this has the long dash in it. It created a noname pdf file.

rob-luke commented 2 years ago

Amazing work with that PR @smseidl 🎉

I will close this issue, but please reopen if anyone is still having issues.