Email Parser

Extract data from emails and automate your workflow

Need help configuring the program? Have any questions regarding its use?
I think I might have been confusing folk, so here goes.

I'm writing to a text file.
Here's my "Text to insert":
'1','<%customerID%>','<%customerID%>','','','','','ADMIN','<%shipToID%>','','','','',N'

I'd like some way to increment the "1" with each successive line I extract from the e-mail....

I've been trying to create a static field above, and increment it.. tried a script & do it in C#...
Help!!!
and Thanks,
Rich
Hey Rich,

Sorry for the late reply. We are very focused on the release of the next version and sometimes we are unable to reply in time.

I have built a small example for you. It basically uses a script to create a field called "my_number" which contains multiple values (1,2,3 and so on). It then uses this field along with the other ones captured from the email to write to a text file.

Screenshots attached below. The script is the following:

using System;
using System.Text;
using System.IO;
using System.Net.Mail;
using System.Collections.Specialized;
using EmailParserBackend.ScriptingInterface;

public class MyAction : ScriptBasedAction
{
// Implement this method with your own code. Run() will be called each time
// this Action runs
public override bool Run(MailMessage email, NameValueCollection fields)
{

int counter = 1;

foreach(string s in fields.GetValues("shipToID"))
fields.Add("my_number",counter++.ToString());

return (true);
}
}
Attachments
create_an_index_field.jpg
create_an_index_field.jpg (203.77 KiB) Viewed 1609 times
for each row.jpg
for each row.jpg (138.92 KiB) Viewed 1609 times
write to a text file using an index variable.jpg
write to a text file using an index variable.jpg (155.71 KiB) Viewed 1609 times
ok, thanks much for the reply.
Glad to hear you're working on the app.

I'll play around with this

Cheers!
Rich