devo00
asked on
Read and Parse All Emails in a Lotus Notes Account
I need to be able to open a Lotus Notes account, cycle through and read data and attachments from all new emails in that account's inbox. How is this done in C#?
So far, I've managed to successfully get a count of messages in the account inbox:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Domino;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
NotesSession session = new NotesSession();
session.Initialize("mypassword");
NotesDatabase db = session.GetDatabase("Server", "mailaccount", false);
NotesView mailView = db.GetView("($Inbox)");
msgCount = mailView.EntryCount;
label1.Text = mailView.EntryCount.ToString();
}
}
-Not sure how to continue.
ASKER
This lets me access the contacts data, but I need to parse out data (body, subject, sender, etc) from emails themselves. Seems like an easy thing to do with the code above, I just don't know the sytax for Lotus objects.
ASKER
Also, I get this error:
CS0246: The type or namespace name 'Contact' could not be found (are you missing a using directive or an assembly reference?)
CS0246: The type or namespace name 'Contact' could not be found (are you missing a using directive or an assembly reference?)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
And forget Contacts, the code was just an example which used someone that had class Contacts defined somewhere...
ASKER
Excellent resources given
Glad I could help :)
Open in new window