email parsing automation

Email Parser

Extract data from emails and automate your workflow

The forum is now read only. Please, go to the the main Email Parser website if you need help.
Post here if you experience problems or get unexpected errors.
I created a script which tests if there are attachments.
As basis I used the default script.

But the result of Attachments.Count is always ZERO even if there are attachements in the email present as you can see in the Output (see attachment)

This is the code I use:
//This is a template for a script-based email filter.
// See https://www.emailparser.com/d/email-sources/using-scripts-filter-emails
// for further information and examples

using System;
using System.Net.Mail;
using EmailParserBackend.ScriptingInterface;

public class MyFilter : ScriptBasedEmailFilter
{
// You have to implement this method. The returned boolean is wether or
// not the email passes the filter.
public override bool FilterEmail(MailMessage msg)
{
// Example 2:
// Check if the email has an attachment
Print(msg.Attachments.Count.ToString());

bool condition2 = msg.Attachments.Count!=0;
//
//
// The email is not blocked if satifies both conditions.
return(condition2);
}
}
Any suggestions???

Regards Matt
Attachments
Attachments.PNG
Last edited by mdehoog on Wed Dec 19, 2018 1:42 pm, edited 1 time in total.
Yes, I have just checked this and it is a bug that seems easy to fix. In a couple of days a new beta version will be released at emailparser.com/beta. I will post here any updates
Thanks for the super fast response :D
I really like the product A LOT and bought a licence this morning.
Thanks ;)

I have just fixed it and uploaded it to:

https://www.emailparser.com/beta

The Beta, at this moment, works very well. You may find some little issues in the way an email is shown in the list of available emails in the email source and not much else.