Hi all
Is it possible to build a system or mail server/service to receive and parse it to extract the text in C#?
Does anyone do it before?
Best Regards,
Hi all
Is it possible to build a system or mail server/service to receive and parse it to extract the text in C#?
Does anyone do it before?
Best Regards,
Are you asking if it is possible to write a mail-server in C#?
Of course it is. I didn't see any MailServer objects that'll handle this for you, however you could just as easily read the RFCs involved (http://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol) and write it using the TCPClient classes.
I've used the Mime4Net library for the parsing very effectively. Email is not a format you want to hand code parsing for. The standard is HUGE and rather complicated.
It might be better to ignore dedicated parser/lexer to do this as the standards for email vary wildly depending on the email transporter, or you can simply ignore the email headers...the only snag is if the email is composed of MIME data...use this Mime4Net to handle this for you or browse around in the open source directory of C# to find the right solution for you.
Hope this helps, Best regards, Tom.
In our company, we have a windows service that does this:
If I correctly understood your question, you could do the same thing.