Click here to Skip to main content
15,867,594 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
I have a project that needs to be download all emails one by one and save each one as an .eml file. I want an open source DLL to do the task. Can anyone say where I can get that open source DLL..?
Posted
Updated 7-Apr-15 4:19am
v2
Comments
Thanks7872 7-Apr-15 9:09am    
Do it using one of the link mentioned here :

https://www.google.co.in/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=save%20email%20as%20eml%20c%23

1 solution

There is no such thing as "download as". There is no difference what file you download via HTTP. You don't need such "DLL" (what is that in .NET? there are assemblies, and "DLL" is only a part of file name of one of possible executable modules)…

The question is not quite clear, what part of downloading do you mean when you tag ASP.NET, the code providing a file for downloading, or downloading code. The simplest way to provide a file for downloading on a Web page would be
HTML
<a href="your-email.eml">Download your e-mail file</a>

The user will be given choice to download the file and open it with some default program for corresponding file types, or just copy it to the file in the client-side file system.

Alternatively, you can dynamically generate a file on the fly by your ASP.NET page (without having this file in the file system on your server side), directly writing generated content into the HTTP response. The key here is to prescribe correct ContentType. Please see:
https://msdn.microsoft.com/en-us/library/system.net.httpwebresponse%28v=vs.110%29.aspx,
https://msdn.microsoft.com/en-us/library/system.net.httpwebresponse.contenttype(v=vs.110).aspx.

The code downloading the file can be written using the class HttpWebRequest (better way than simpler HttpClient). You can use my HttpDownloader and see how it is done; I provided complete source code in this answer: how to download a file from internet.

Additionally, it allows to continue downloading of partially downloaded files.

See also my past answers:
how to download a file from the server in Asp.net 2.0,
FTP: Download Files.

I have an impression that you wanted to ask something else, something specific to EML, but I have no idea what it could be. This is not my fault — you did not explain it.

—SA
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900