epfromer / pst-extractor

Extract objects from MS Outlook/Exchange PST files
57 stars 18 forks source link

Get Attachments exists in the .pst File #19

Closed swethakrgs closed 3 years ago

swethakrgs commented 3 years ago

Hi, How to get the attachments exist in .pst File i have .PST file with attachments .doc,.txt,.pdf,.excel,zip,.xlx files by using below code i am able to get buffet data for .txt for remaining .doc,,.pdf,.excel,zip files i am not getting buffer data getting null , var email = folder.getNextChild(); while (email != null) { for (var i = 0; i < email.numberOfAttachments; i++) { const fileData = email.getAttachment(i).fileInputStream.allData; const FileName = email.getAttachment(i).filename; fs.writeFile(FileName, fileData, function (err) { if (err) { console.log(err) } else { console.log("kkk file saved"); }

            })
        }
      Can you please help on this
sharpcodepro commented 3 years ago

I'm having the same issue. To shed more light on this, when attachMethod is 1, I get no data with fileInputStream.allData. However, if the attachMethod is 5, then I do get bytes in fileInputStream.allData. I can't figure out how to read attachments when the method is 1.

epfromer commented 3 years ago

I will look at this, but am literally off the grid for several weeks as a high mountain trail crew lead.

epfromer commented 3 years ago

I'm back and able to look at this - can someone please create a PST/OST that reproduces this problem for me?

swethakrgs commented 3 years ago

hi sir some time while extracting .pst file i am getting the below issue

PSTFile::open Invalid file header (expected: "!BDN"): <?xml version="1.0" encoding="utf-8"?><Error><Code>Authenticatio

nFailedServer failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. RequestId:964d9318-201e-0031-1fc4-92dfde000000 Time:2021-08-16T17:27:58.8102506ZSignature not valid in the specified time frame: Start [Mon, 16 Aug 2021 17:28:00 GMT] - Expiry [Fri, 20 Aug 2021 17:28:00 GMT] - Current [Mon, 16 Aug 2021 17:27:58 GMT]</Auth at new PSTFile (D:\solix\arca-file-management\node_modules\pst-extractor\dist\PSTFile.class.js:66:19)

epfromer commented 3 years ago

I have just released a new version v1.8 that fixes a bug where attachments can be malformed / truncated. Please try this out and if this doesn't solve the problem, reopen the issue.

swethakrgs commented 3 years ago

Okay thank you so much sir

On Tue, 17 Aug, 2021, 12:47 AM Ed Pfromer, @.***> wrote:

Closed #19 https://github.com/epfromer/pst-extractor/issues/19.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/epfromer/pst-extractor/issues/19#event-5164971114, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFTCL25ZUKQLQT4NOH2ANM3T5FP4ZANCNFSM456O2O6A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

swethakrgs commented 3 years ago

hi sir, i am getting the below error if possible can you please check once.i am passing buffer

mkmk,,,. <Buffer ef bb bf 3c 3f 78 6d 6c 20 76 65 72 73 69 6f 6e 3d 22 31 2e 30 22 20 65 6e 63 6f 64 69 6e 67 3d 22 75 74 66 2d 38 22 3f 3e 3c 45 72 72 6f 72 3e 3c 43 ... 494 more bytes> err Error: PSTFile::open Invalid file header (expected: "!BDN"): <?xml version="1.0" encoding="utf-8"?>Authenticatio nFailedServer failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. RequestId:24e244d2-a01e-0046-2393-955a9f000000 Time:2021-08-20T07:19:55.2963638ZSignature not valid in the specified time frame: Start [Fri, 20 Aug 2021 07:20:00 GMT] - Expiry [Tue, 24 Aug 2021 09:20:00 GMT] - Current [Fri, 20 Aug 2021 07:19:55 GMT]</Auth at new PSTFile (D:\solix\arca-file-management\node_modules\pst-extractor\dist\PSTFile.class.js:66:19)

On Tue, Aug 17, 2021 at 2:13 AM Ed Pfromer @.***> wrote:

My email is @.***

On Mon, Aug 16, 2021 at 1:44 PM swethakrgs @.***> wrote:

Okay thank you much, sir if possible can I get your mail id

On Tue, 17 Aug, 2021, 12:47 AM Ed Pfromer, @.***> wrote:

Closed #19 https://github.com/epfromer/pst-extractor/issues/19.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub <https://github.com/epfromer/pst-extractor/issues/19#event-5164971114 , or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AFTCL25ZUKQLQT4NOH2ANM3T5FP4ZANCNFSM456O2O6A

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email

.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub < https://github.com/epfromer/pst-extractor/issues/19#issuecomment-899771552 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AD3WGQUETS3OLMTNH7O3IILT5FTA7ANCNFSM456O2O6A

. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android < https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email

.

-- Thanks, Ed Pfromer

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/epfromer/pst-extractor/issues/19#issuecomment-899805381, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFTCL26DC7EHBF6PWEN65L3T5FZ53ANCNFSM456O2O6A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

swethakrgs commented 3 years ago

Google Meet logo

swetha reddy @.***> is inviting you to join a
video meeting happening now

Join Meeting

meet.google.com/erj-uskb-cxs