Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

save_attachments with nested msg messages dose not work #13

Open
tbobin opened this issue Feb 22, 2019 · 0 comments
Open

save_attachments with nested msg messages dose not work #13

tbobin opened this issue Feb 22, 2019 · 0 comments
Assignees

Comments

@tbobin
Copy link

tbobin commented Feb 22, 2019

Hi,
I have a msg file that has 2 attachments an Excel file and a msg file.
The attached msg file has also 2 attachments 1 picture and 1 excel file.
So the structure is like this:
Msg
-.msg
-- .png
-- .xlsx
-.xlsx

If I try to save the attachments with msgxtractr::save_attachments(msg_file, use_short = F)
I get follwing error:

> msgxtractr::save_attachments(msg_file, use_short = F)
Saving D:/Entwurf/R/msgexample/R_logo.png (22,097 bytes)Saving D:/Entwurf/R/msgexample/Excel_file_1.xlsx (22,097 bytes)
Error in file(con, "wb") : invalid 'description' argument

To me, it seems that the read function reads all nested msg files and "saves" all attachments from this second msg file in one list element. But the save function cannot deal with several attachments in one element...

msg_file_list

> sessionInfo()
R version 3.4.4 (2018-03-15)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=German_Germany.1252  LC_CTYPE=German_Germany.1252    LC_MONETARY=German_Germany.1252
[4] LC_NUMERIC=C                    LC_TIME=German_Germany.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] msgxtractr_0.2.1

loaded via a namespace (and not attached):
[1] colorspace_1.4-0 scales_1.0.0     compiler_3.4.4   tools_3.4.4      yaml_2.2.0       Rcpp_1.0.0       munsell_0.5.0
@hrbrmstr hrbrmstr self-assigned this Feb 22, 2019
dzastera added a commit to dzastera/msgxtractr that referenced this issue Mar 29, 2024
Updated attachment processing to handle nested attachments and updated the regex on msg_fields to be more robust with grep.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants