No internet connection
  1. Home
  2. General

Parsing .eml files in TA5

By @enum
    2022-01-18 14:14:28.825Z

    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.

    • 9 replies
    1. L
      Liam @liam
        2022-01-19 09:28:18.329Z

        Hi enum

        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.

        1. E@enum
            2022-01-21 18:34:32.125Z2022-01-21 20:46:21.523Z

            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?

            Thanks!

            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?

            1. LLiam @liam
                2022-01-28 14:09:14.562Z

                Hi enum

                Apologies for the delay. I've raised this with the development team as I seem to have the same issue.

                1. E@enum
                    2022-01-31 17:06:29.467Z2022-01-31 19:31:24.899Z

                    Liam,

                    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:

                    1. LLiam @liam
                        2022-02-01 08:20:15.103Z

                        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.

                        1. E@enum
                            2022-02-03 21:14:09.973Z

                            After some investigation, I figured out these are actually new emails triggering this error. Any suggestions on why this could be?

                            1. LLiam @liam
                                2022-02-04 08:32:58.054Z

                                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.

                                1. E@enum
                                    2022-02-04 16:27:15.788Z

                                    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?

                                    1. LLiam @liam
                                        2022-02-07 09:26:48.101Z

                                        Could you email a copy of an original failing email over to support@parkersoftware.com, 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?