Create & Read Email Files Utilities

Use Case Details

This Plug-in contains Functions and Smart Services that allow users to create and read email files containing all e-mail attributes, i.e. to, cc, bcc, from, subject, body, content type, and attachments. The generated file can be read by any email client that supports EML files, such as Outlook Express and Windows Live Mail. The Plug-in and a help guide are provided with this listing.

This version is for Appian 22.3 and above. Cloud customers on a lower version of Appian that want to install this plugin should open a support case. Self-managed customers can find the latest jar for Appian 22.2 and lower version by downloading from the app market.

Features & Functionality

Smart Services:

  • Creating EML File: Create Eml File
  • Reading EML File: Read Eml File

Features:

  • Creates Email files/documents that can be read on all email clients supporting eml files.
  • Reads all email files to extract all email-related attributes such as to, cc, bcc, subject, body, attachments, content type.
Anonymous
  • Hi Team,

    We are running into an issue post 22.3 version upgrade where the generated eml file only displays html content of the email in "Text Plain" format. This appears to be an encoding issue, as copy-pasting the html content and saving it in a .html file, renders the html content correctly. Could you please let us know what potential values can be passed for Content-type parameter in Create Eml utility smart service.

    Thanks,

    Arjun

  • Hi Michael,

    we have retest the case and the plugin is not able extract a attach to eml that is another eml (this is a standard behaviur of the Mail Cerificate)POSTA CERTIFICATA_ Prova (5).eml

    the rule return:

    fn!reademlfile (
    fn!todocument(54207),
    fn!tofolder(54044)
    )

    {"cc":[],"sentDate":"11\/5\/2022 9:42 PM","bcc":[],"attachments":[],"subject":"POSTA CERTIFICATA: Prova","from":"\"Per conto di: marcello.maio@pec.it\" <posta-certificata@pec.aruba.it>","documentName":"POSTA CERTIFICATA_ Prova (5)","to":["devstornimef <devstornimef@pec.posteitaliane.it>"],"saveInto":25022,"body":"jakarta.mail.internet.MimeMultipart@2d79ec40","contentType":"multipart\/mixed; boundary=\"----------=_1667684521-193827-712\""}.

    Could you help us?

    Thanks

    Marcello

  • Hi Michael,

    we are try to use your plugin to read an eml (come from an MAIL CERTIFICATE), but the plugin return thi error:

    Modificata in PLUGIN ERROR : org.apache.poi.poifs.filesystem.NotOLE2FileException: Invalid header signature; read 0x7246203A65746144, expected 0xE11AB1A1E011CFD0 - Your file appears not to be a valid OLE2 document

    If we can try to open the eml from outlook, we non have any problem.postacert.eml mah.msg

    Could you verify what if the problem and it wil be fixed.

    Thanks

    Marcello

  • We've updated to v2.0.1 and now the Content-Type for all emails is "text/plain".  They used to be "text/html".  In the smart service node, the Content Type input is blank.  We've tried setting it to "text/html", but that doesn't work either.

    How do we get the content type to be "text/html".

    Thanks.

  • v2.0.1 Release Notes
    • Fixes encoding of text/plain and text/html content types to render special characters properly using UTF-8 encoding.
    • Fixes an issue that could be encountered when parsing multipart/mixed content.
  • Hi Arpit.

    Does the log have more details about the error?

    The error that you sent before (CreateEmlFileOOTB.setMaxSubjectLength) could be may be because you don't have any value for 'Max Subject Lengh' or the subject length of your eml file is grater than this value?

    Another topic, it´s not mandatory, but you have to set the node attribute 'Avoid Txt Alternative' true or false.

    Check it and tell.

    BR.


  • Also, it appears that input nodes that are not mandatory if no value is passed then throw the error. For instance, Max Subject Length:

    Caused by: java.lang.NullPointerException
    	at com.appcino.plugin.emlutility.smartservice.CreateEmlFileOOTB.setMaxSubjectLength(CreateEmlFileOOTB.java:143)


  • Thank you for your time and response.

    Yes, after realizing that I replaced it with a new node available named 'Create Eml File from OOTB Poller'
    Then it throws the following error:

    An error occurred while executing activity: id=537021359, classname=com.appcino.plugin.emlutility.smartservice.CreateEmlFileOOTB com.appiancorp.suiteapi.process.exceptions.SmartServiceException: An error occurred while creating the note.

    Please check my reply to another comment.
    And please help if you can.

  • Hi Arpit.

    I think you have the value "multipart/mixed; " setted in your node input variable 'Content Type'.

    I saw the following in javax doc:

    So I think you should try to execute the node with "" value in your node input variable 'Content Type'. 

  • Also, when I replaced with a new node available named 'Create Eml File from OOTB Poller'
    Then it throws the following error:

    An error occurred while executing activity: id=537021359, classname=com.appcino.plugin.emlutility.smartservice.CreateEmlFileOOTB
    com.appiancorp.suiteapi.process.exceptions.SmartServiceException: An error occurred while creating the note.
    	at com.appcino.plugin.emlutility.smartservice.CreateEmlFileOOTB.run(CreateEmlFileOOTB.java:62)
    	at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.lambda$call$0(DefaultActivityExecutor.java:136)
    	at com.appiancorp.plugins.PluginUsageLogger.runWithPluginInformation(PluginUsageLogger.java:52)
    	at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:136)
    	at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:130)
    	at com.appiancorp.common.ContextClassLoaderSwitcher.runInContext(ContextClassLoaderSwitcher.java:27)
    	at com.appiancorp.process.runtime.framework.DefaultActivityExecutor.execute(DefaultActivityExecutor.java:130)
    	at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute(UnattendedJavaActivityRequest.java:88)
    	at com.appiancorp.process.engine.UnattendedJavaActivityRequestResponseCreator.getJavaActivityResultResponse(UnattendedJavaActivityRequestResponseCreator.java:21)
    	at com.appiancorp.process.engine.UnattendedJavaActivityRequest.getJavaActivityResultResponse(UnattendedJavaActivityRequest.java:67)
    	at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute0(UnattendedJavaActivityRequest.java:55)
    	at com.appiancorp.common.persistence.data.AppianDataUserContextProvider.executeWithConsistentDataReads(AppianDataUserContextProvider.java:143)
    	at com.appiancorp.process.engine.ProcessContinuationRequest.executeOuter(ProcessContinuationRequest.java:68)
    	at com.appiancorp.process.engine.ContinuationRequest.execute(ContinuationRequest.java:129)
    	at com.appiancorp.process.workpoller.UnattendedRequestHandlerBean.onMessage(UnattendedRequestHandlerBean.java:36)
    	at com.appiancorp.process.workpoller.WorkItem.run(WorkItem.java:110)
    	at org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter.run(SimpleTaskWorkManager.java:239)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    	at java.lang.Thread.run(Thread.java:750)