Send & Receive Email, No Code Required
Send & Receive Email, No Code Required
  • DataBind to Internet mail servers using standard Visual Studio wizards.
  • Send & Receive Email through POP3, IMAP, and SMTP, Verify Addresses, and more!
  • Comprehensive support for CRUD (Create, Read, Update, and Delete) operations.
Download Beta

The Email ADO.NET Data Provider offers the most natural way to access Email from any .NET application. Simply use Email Data Provider objects to connect and access data just as you would access any traditional database. You will be able to use the Email Data Provider through Visual Studio Server Explorer, in code through familiar classes, and in data controls like DataGridView, GridView, DataSet, etc.

Using the Email Data Provider

The Email Data Provider wraps the complexity of accessing Email via protocols like POP, IMAP, and SMTP, into an easy-to-integrate, fully-managed ADO.NET Data Provider. Applications then access Email through the Email Data Provider with simple Transact-SQL.

 

The Email ADO.NET Data Provider hides the complexity of accessing data and provides additional powerful security features, smart caching, batching, socket management, and more.

Working with DataAdapters, DataSets, DataTables, etc.

The Email Data Provider has the same ADO.NET architecture as the native .NET data providers for SQL Server and OLEDB including: EmailConnection, EmailCommand, EmailDataAdapter, EmailDataReader, EmailDataSource, EmailParameter, and EmailTransaction. Because of this you can now access Email data in an easy, familiar way.

For example:

using (EmailConnection conn = new EmailConnection("...")) {
	string select = "SELECT * FROM Messages";
	EmailCommand cmd = new EmailCommand(select, conn);
	EmailDataAdapter adapter = new EmailDataAdapter(cmd);
	using (adapter) {
		DataTable table = new DataTable();
		adapter.Fill(table);		
		...
	}
}

More Than Read-Only: Full Update/CRUD Support

Email Data Provider goes beyond read-only functionality to deliver full support for Create, Read Update, and Delete operations (CRUD). Your end-users can interact with the data presented by the Email Data Provider as easily as interacting with a database table.

using (EmailConnection connection = new EmailConnection(connectionString)) {
	EmailDataAdapter dataAdapter = new EmailDataAdapter(
	"SELECT Name, Flags FROM Mailboxes", connection);
  
	dataAdapter.UpdateCommand = new EmailCommand(
		"UPDATE Mailboxes SET Flags = @Flags " +
		"WHERE Name = @Name", connection);

	dataAdapter.UpdateCommand.Parameters.AddWithValue("@Flags", "Flags");
	dataAdapter.UpdateCommand.Parameters.AddWithValue("@Name", "Inbox.Text");

	DataTable MailboxesTable = new DataTable();
	dataAdapter.Fill(MailboxesTable);

	DataRow firstrow = MailboxesTable.Rows[0];
	firstrow["Flags"] = "Deleted";

	dataAdapter.Update(MailboxesTable);
}