Send excel file as email attachment



I want to send input excel file as an email attachment via Exstream application. The excel file should not be changed.

I saw in documentation that Bypass filter can be used for transferring the input file to the output, but I am not able create it correct. In documentation there is a very small amount of info for Bypass filter, so I don't know how to configure it.

Anyway this is what I have implemented:

Focus is only on parts in red circles. I have input connector which receives excel and I have there the Bypass filter:

Based on documentation, I created dummy Event and RedirectOut process connected to SMTP output connector.

When I test this, I get only this on Control Center and nothing happen. Application in Control Center crush:

Can someone please help me with this?

Kind Regards,



  • stig_2018


    another way could be to use the function 'MIMEAddPart'/'MIMESetPartProperty' on before-process.

    and then look at your input-steps…

    -don't delete the input-file on input-connector (check box)


    -let the input-connector be used as a trigger (i.e. every 2 min.), and then use script-functions to do the rest


  • Dzoni90

    Hello @stig_2018

    Thank you for your answers, but I think I didn't get it.

    When you say that there is another way, you think that I abandon the idea of Bypass filter at all?

    But without Bypass filter I can't skip Event part. I think only Bypass filter gives me option to skip Event, because Event is in that case used as dummy Event and I can put any Event there. I have to skip Event because I don't know which type of Event to use for input excel file (how to make pattern for excel, fields etc.). In general, we need to connect input connector to some Event (Exstream request that for input connector in Runtime) and that is what makes problem here for me and that is why I don't know how to create neither of your two options.

    Also, I have to delete input file in some point (somehow automatically), because I don't want to same file be sent several times, if that file stays on input directory and input connector picks it up every few minutes.

    Function 'MIMEAddPart'/'MIMESetPartProperty' probably can help, but I don't know how to deliver input excel file to some before process.

    Any more help, please?

    Kind Regards,


  • stig_2018


    script before-process:

    $key = mimeaddpart("document-name.csv", 0); //0 - attachment (document, image, etc) / 1 – Use as body /2 – Use as alt. body//
    MIMESetPartProperty($key, "content-type", "text/plain"); //text/plain - text/x-csv//

    MIMESetPartProperty($key, "codepage", "UTF-8");

    then after-MSG or after-JOB you could use 'filedelete()', or 'filemove()' for backup-use of the csv-file in question…

    //Stig ;-)