Send the contents of an .eml file by email with c #

4

Would it be possible to send the content of an .eml file by email with c # without an attachment?

I am currently sending messages with class MailMessage and I do not know if it would be possible to enter the content (with included photos) of the .eml file in the messaje.

    
asked by gvivetapl 18.01.2016 в 17:45
source

2 answers

3

You can use Chilkat Email .NET Component

You have a LoadEml method where you just pass the path of your file

Documentation :

public bool LoadEml(string mimePath);
     

Loads to complete email from a .EML file. (EML files are simply RFC822 MIME text files.)

     

Returns true for success, false for failure.

    
answered by 18.01.2016 в 18:05
3

You could evaluate a library that implements an eml reader, such as

Easily Retrieve Email Information from .EML Files

Advanced MIME Parser / Creator / Editor

To be able to extract the information from the eml and use this in the MailMessage setup

There are also some viewer, of which to have the code and analyze how the eml parsean, you would take those parts to build your own utility.

Desktop Eml (Eml) Viewer

    
answered by 18.01.2016 в 18:21