Parsing .eml files in TA5
Anyone have any tips/tricks they use to pull .eml files into an automation in TA5?
it would be cool if I could call a new automation using the .eml file as the email source of the automation, but really I Just need to be able to put the text into a variable.
- 11 replies
- LLiam @liam
You can use the file pickup message source to pull in EML files as if they were emails.
Just remember to check the box "Add File Contents", an example of the message source set up is below.
To read in EML information during an automation you can use the Read/Write text file action, EML files are just a formatted text files.
However, doing this will not pull in the information like using the message source would, it would just pull in the raw text, so this may not be suitable, depending on what you want to pull from the EML file.
Hey @liam this seems to be working great, but for some reason "Delete after pickup"
doesn't seem to be working for me and it is not throwing any errors.
Any ideas what could be causing this?
Edit: also, I noticed while trying to work around the fact that the automation doesn't delete my files automatically, that when a .eml file is passed into the file pickup there is no way to get the file path and file name. Am I wrong about this?
Apologies for the delay. I've raised this with the development team as I seem to have the same issue.
Another problem I am having with this:
I am getting this error:
Failed With Error: SubjectLineOfEmail.eml could not be saved. No longer exists at C:\ProgramData\Parker Software\ThinkAutomation.NET\CompanyName\ProcessUndeliveredEmail_61eed47b2c45023c1cecafde\Temp\Task1\SubjectLineOfEmail.eml
This error causes my automations to pause and I have no clue what could be causing it.
Here is the configuration for my save attachments:
Are these new emails or reprocessed emails?
I'd expect this kind of error if you were reprocessing an email as the temporary files would have been removed.
After some investigation, I figured out these are actually new emails triggering this error. Any suggestions on why this could be?
I noticed in your example path you've replaced the subject for us.
Is this happening on all emails?
If it is only happening on some, what is the subject on one of the failed emails?
My thought is that the file path is too long, which might happen with very long subject lines.
C:\ProgramData\Parker Software\ThinkAutomation.NET\CompanyName\ProcessUndeliveredEmail_61eed47b2c45023c1cecafde\Temp\Task1\Delivery Status Notification (Failure).eml
In this example I only replaced the Company Name. I don't think its the subject line because all the subject lines that it is processing are about the same.
It seems to be only failing for an occasional email, usually one that has a similar message date as other emails being processed.
Is there any other information I could provide you with that might help figure out the issue?
Could you email a copy of an original failing email over to firstname.lastname@example.org, please?
Just include a link to this community page, so we know what it is for.
We'll have to try it out to see if we can replicate the problem.
If you reprocess the same message again, does it fail again? i.e. does a failing message always fail?
- BBrindha Sudharsan @brinsud
i am doing outlook mail sending automation in XL-VBA macros. getting issue in sending .eml templates at line
Set oMail = outapp.CreateItemFromTemplate(strTemplate)
stating that 'you dont have permission' . how to rectify this error.
.msg templates works fine with the same syntax