0 votes

Could someone please show me a quick C# snippet for using HeaderDecoder?
I'm still learning C# and I'm trying to implement Decode in my Program.

public string Decode(
string text

)

Currently, I'm getting the headers as a list

var eml = imap.GetMessageByUID(uid);
IMail mail = new MailBuilder().CreateFromEml(eml); 

myapp.model.message msg = new model.message();   
msg.headers = new Dictionary<string, List<string>>();

This gives me everything raw so I end up with base64 and Quoted-Printable From/Subject etc.

closed with the note: Not enough information.
by (200 points)
closed by
Why do you need to decode anything? All IMail properties (e.g. IMail.Subject) are already decoded. Also in your code you're not accessing headers anywhere.
My problem was I needed to add IMail.Headers to my message class in a method.  Thanks
If you want to add headers, why do you need to decode anything? What kind headers you need to add?
...