Skip to main content
Solved

Email test for specified attachments types, then save these attachments to UNC


hlouie
Contributor
Forum|alt.badge.img+16

Started to build a FME Workspace that would test in-coming email for 2 files attachments with a specific pattern. I'll email reply back if the 2 files are not found, if found then save them to a network UNC location.

 

I've got reading email json -> into 2 ListSearcher (1 for each file)

 

This is where I'm hung up as testing for the 2 specific files (it has 2 files and very specific for each to the 2 files)?

 

test_save

Best answer by jdh

I haven't ever worked with email attachments, but could you use a FileCopy Writer to save the attachments to the UNC?

View original
Did this help you find an answer to your question?

7 replies

anhphuongt
Forum|alt.badge.img

Hello @hlouie​ ,

Did you check this tutorial from Safe?:

https://community.safe.com/s/article/receiving-email-part-3-using-email-attachments

You will be able to save the attachments to UNC location.


hlouie
Contributor
Forum|alt.badge.img+16
  • Author
  • Contributor
  • October 21, 2020

I've been able to save the attachments but FeatureWriter strips some of the features. I'm wondering if there is a Binary way of saving the file.featurewriterThank-you anhphuongt,


anhphuongt
Forum|alt.badge.img

Do you mean some elements in the AutoCAD Map 3D Object Data is missing some elements compared to the original file?

Maybe you can try with a real AutoCAD Map 3D Object Data Writer:

4y3rWh2sxi


hlouie
Contributor
Forum|alt.badge.img+16
  • Author
  • Contributor
  • October 22, 2020
anhphuongt wrote:

Do you mean some elements in the AutoCAD Map 3D Object Data is missing some elements compared to the original file?

Maybe you can try with a real AutoCAD Map 3D Object Data Writer:

4y3rWh2sxi

Bingo (yes). When using FeatureWriter, I need to select an output format. I'm wondering if the FeatureWriter could be Dyanamic in output?

Reasoning, one of the input Autodesk DWG is Civil3D combined with ObjectData. So when selecting saving in a select format some features are removed during the saving process.


anhphuongt
Forum|alt.badge.img

I don't think FME can dynamically choose the Writer depending on the data just by using the writer to do it.

Even if it is possible by having some tester to direct different type of data into separate writer, you still have 2 different files. Not everything in the same output file.


jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • Best Answer
  • October 23, 2020

I haven't ever worked with email attachments, but could you use a FileCopy Writer to save the attachments to the UNC?


hlouie
Contributor
Forum|alt.badge.img+16
  • Author
  • Contributor
  • October 26, 2020

Solution was simpler after @jdh​ suggested to use FileCopy Writer.

FME Server holds the email JSON

'C:\\ProgramData\\Safe Software\\FME Server\\resources\\system\\temp\\subscriptions\\d592d6a2301c4084a71a2cebe92c0599.json'

FME Server holds the email attachments

Performing query against PATH dataset `C:\\ProgramData\\Safe Software\\FME Server\\resources\\system\\temp\\emailattachments\\20201026133726-engprojects-80000_qaqc\\'

FileCopy from FME Server RESOURCE Location to UNC location

File Copy Writer: Received copy request from 'C:\\ProgramData\\Safe Software\\FME Server\\resources\\system\\temp\\emailattachments\\20201026133726-engprojects-80000_qaqc\\80000_ConstructionRecorded1_1.0.dwg' to '\\\\???\\???\\???\\???\\???\\???\\80000_ConstructionRecorded1_1.0.dwg'

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings