2

I am using openpop.net to read emails and print them after checking the subject. However im stuck on the first step, MessageHeader, RfcMailAddress and File shows up as error "The type or namespace name "Message Header" could not be found".

I think i havnt declared the right references but not sure. I have declared the following references:

using OpenPop;
using OpenPop.Pop3;
using OpenPop.Mime;
using OpenPop.Common;

any help is appreciated.

my code is copied from http://hpop.sourceforge.net/exampleExamineHeaders.php

Below is how my code looks like this is my code

kirtan
  • 289
  • 4
  • 13
  • partly fixed, i managed to fix the Message error by changing it to OpenPop.Mime.Message and file error by using a using a different code to save the file however i am still getting errors for Message Header and RfcMailAddress – Private Hanks Mar 19 '16 at 18:30

2 Answers2

0

using OpenPop.Mime.Header;

            MessageHeader headers = client.GetMessageHeaders(messageNumber);
            RfcMailAddress from = headers.From;
            string Subject = headers.Subject;
0

Use:

OpenPop.Mime.Header.MessageHeader headers = client.GetMessageHeaders(messageNumber);
OpenPop.Mime.Header.RfcMailAddress from = headers.From;
Joe Mayo
  • 7,501
  • 7
  • 41
  • 60
  • 2
    Thanks for answering a question - can you add some explanation to help OP understand what it is about your answer that solves the problem. It also makes the site more useful for people (of various levels of experience) who might come across the question later. – Joe Mayo Apr 19 '20 at 01:15