[Mono-list] Mail API

Gaurav Vaish gvaish@iitk.ac.in
Sun, 27 Jan 2002 11:02:10 +0530


This is a multi-part message in MIME format.

------=_NextPart_000_0031_01C1A722.119B4680
Content-Type: text/plain;
	charset="Windows-1252"
Content-Transfer-Encoding: 7bit

Hello,
    Recently, I'd been busy making an API for Mail services / providers for
dotNet platform, similar to what JavaMail is for.

    Till now, I've done some work for the API related to Headers, Part, Body,
Message, EMailAdress(List) and InternetAddress(List). I'd appreciate critical
comments on the API, for the so far implemented as well as the architecture and
to be designed part.
    I've put up a small discussion at:
        http://www.geocrawler.com/lists/3/SourceForge/17612/0/7570314/

    I'd soon be coming up for the Transfer and Store part which will leave me to
do with classes like / concerning:
    * Date (esp to deal with various date formats)
    * MailingList (to deal with Mailing-List, List-Subscribe, List-Unsubscribe,
Delivered-To etc)
    * Received (to deal with Received headers, I am not sure whether to separate
it or not)

    * TextPlainEncoding
    * QuotedPrintableEncoding
    * MimeEncoding

    * Events and Delegates (specific to folders, transfer and message)
    * Utils (separate namespace, comprising of mainly searching from various
parts, special headers [date, received, address etc] of a message)
    * Exceptions (list of exceptions)



Cheers,
Gaurav Vaish
http://mastergaurav.virtualave.net
http://calendar.yahoo.com/mastergaurav
---------------------------------


------=_NextPart_000_0031_01C1A722.119B4680
Content-Type: text/xml;
	name="csMailAPI.xml"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="csMailAPI.xml"

<csmail>
	<interface name=3D"IEncode">
		<property name=3D"ContentType" type=3D"string" allow=3D"get"/>
		<property name=3D"DecodedData" type=3D"string" allow=3D"get"/>
		<property name=3D"EncodedContent" type=3D"string" allow=3D"get"/>
		<property name=3D"TransferEncoding" type=3D"TransferEncoding" =
allow=3D"get, set"/>
		<property name=3D"ContentDisposition" type=3D"ContentDisposition" =
allow=3D"get, set"/>
	</interface>
	<interface name=3D"IAddress">
		<property name=3D"AddressType" type=3D"AddressType" allow=3D"get"/>
		<method name=3D"Equals" return=3D"bool">
			<param name=3D"address" type=3D"IAddress"/>
		</method>
	</interface>
	<interface name=3D"IAddressList">
		<property name=3D"Count" type=3D"int" allow=3D"get"/>
		<method name=3D"Clone" return=3D"void"/>
		<method name=3D"GetAddress" return=3D"IAddress[]"/>
		<method name=3D"GetAddress" return=3D"IAddress">
			<param name=3D"index" type=3D"int"/>
		</method>
		<method name=3D"Add" return=3D"int">
			<param name=3D"address" type=3D"IAddress"/>
		</method>
		<method name=3D"AddAt" return=3D"void">
			<param name=3D"index" type=3D"int"/>
			<param name=3D"address" type=3D"Address"/>
		</method>
		<method name=3D"Clear" return=3D"void"/>
		<method name=3D"Remove" return=3D"void">
			<param name=3D"address" type=3D"Address"/>
		</method>
		<method name=3D"RemoveAt" return=3D"void">
			<param name=3D"index" type=3D"int"/>
		</method>
	</interface>
	<enum name=3D"ContentDisposition">
		<member name=3D"Inline"/>
		<member name=3D"Attachment"/>
	</enum>
	<enum name=3D"TransferEncoding">
		<member name=3D"7Bit"/>
		<member name=3D"QuotedPrintable"/>
		<member name=3D"Base64"/>
		<member name=3D"8Bit"/>
		<member name=3D"Binary"/>
		<member name=3D"UserDefined"/>
	</enum>
	<enum name=3D"AddressType">
		<member name=3D"EmailAddress"/>
		<member name=3D"InternetAddress"/>
		<member name=3D"NewsAddress"/>
	</enum>
	<enum name=3D"ReciepientType">
		<member name=3D"To"/>
		<member name=3D"Cc"/>
		<member name=3D"Bcc"/>
	</enum>
	<class name=3D"Header">
		<property name=3D"Name" type=3D"string" allow=3D"get"/>
		<property name=3D"Value" type=3D"string" allow=3D"get"/>
		<property name=3D"Values" type=3D"string[]" allow=3D"get"/>
		<method name=3D"ctor">
			<param name=3D"name" type=3D"string"/>
			<param name=3D"value" type=3D"string"/>
		</method>
		<method name=3D"ctor">
			<param name=3D"name" type=3D"string"/>
			<param name=3D"values" type=3D"string[]"/>
		</method>
	</class>
	<class name=3D"HeaderList">
		<property name=3D"IsEmpty" type=3D"bool" allow=3D"get"/>
		<method name=3D"ctor">
			<param name=3D"headers" type=3D"Header[]"/>
		</method>
		<method name=3D"ctor">
			<param name=3D"list" type=3D"HeaderList"/>
		</method>
		<method name=3D"AddHeader" return=3D"void">
			<param name=3D"header" type=3D"Header"/>
		</method>
		<method name=3D"SetHeader" return=3D"void">
			<param name=3D"header" type=3D"Header"/>
			<param name=3D"overWrite" type=3D"bool"/>
		</method>
		<method name=3D"RemoveHeader" return=3D"void">
			<param name=3D"header" type=3D"Header"/>
		</method>
		<method name=3D"RemoveHeader" return=3D"void">
			<param name=3D"name" type=3D"string"/>
		</method>
		<method name=3D"Item" return=3D"string[]">
			<param name=3D"headerName" type=3D"string"/>
		</method>
		<method name=3D"Exists" return=3D"bool">
			<param name=3D"name" type=3D"string"/>
		</method>
		<method name=3D"Exists" return=3D"bool">
			<param name=3D"header" type=3D"Header"/>
		</method>
	</class>
	<class name=3D"Part">
		<property name=3D"Headers" type=3D"HeaderList" allow=3D"get, set"/>
		<property name=3D"Content" type=3D"IContent" allow=3D"get, set"/>
		<method name=3D"ctor">
			<param name=3D"headers" type=3D"HeaderList"/>
			<param name=3D"content" type=3D"IContent"/>
		</method>
	</class>
	<class name=3D"PartList">
		<method name=3D"ctor"/>
	</class>
	<class name=3D"Body">
		<property name=3D"Boundary" type=3D"string" allow=3D"get, set"/>
		<property name=3D"Preamble" type=3D"string" allow=3D"get, set"/>
		<property name=3D"IsBoundary Defined" type=3D"bool" allow=3D"get"/>
		<method name=3D"ctor">
			<param name=3D"parts" type=3D"PartList"/>
		</method>
		<method name=3D"GenerateBoundary" return=3D"void"/>
	</class>
	<class name=3D"Message">
		<property name=3D"Body" type=3D"Body" allow=3D"get"/>
		<property name=3D"Headers" type=3D"HeaderList" allow=3D"get"/>
		<method name=3D"ctor">
			<param name=3D"headers" type=3D"HeaderList"/>
			<param name=3D"body" type=3D"Body"/>
		</method>
	</class>
	<class name=3D"EMailAddress">
		<property name=3D"Name" type=3D"string" allow=3D"get"/>
		<property name=3D"Value" type=3D"string" allow=3D"get"/>
		<method name=3D"ctor">
			<param name=3D"value" type=3D"string"/>
			<param name=3D"name" type=3D"string"/>
		</method>
		<implements>
			<interface name=3D"IAddress"/>
		</implements>
	</class>
	<class name=3D"InternetAddress">
		<property name=3D"Value" type=3D"string" allow=3D"get"/>
		<method name=3D"ctor">
			<param name=3D"value" type=3D"string"/>
		</method>
		<implements>
			<interface name=3D"IAddress"/>
		</implements>
	</class>
	<class name=3D"EMailAddressList">
		<property name=3D"Empty" type=3D"EMailAddressList" allow=3D"get"/>
		<method name=3D"ctor"/>
		<method name=3D"ctor">
			<param name=3D"emails" type=3D"EmailAddress[]"/>
		</method>
		<method name=3D"ctor">
			<param name=3D"list" type=3D"EMailAddressList"/>
		</method>
		<method name=3D"Item" return=3D"EMailAddress">
			<param name=3D"index" type=3D"int"/>
		</method>
		<method name=3D"Add" return=3D"int">
			<param name=3D"email" type=3D"EMailAddress"/>
		</method>
		<method name=3D"Add" return=3D"int">
			<param name=3D"emails" type=3D"EMailAddress[]"/>
		</method>
		<method name=3D"Clear" return=3D"void"/>
		<method name=3D"Set" return=3D"void">
			<param name=3D"index" type=3D"int"/>
			<param name=3D"email" type=3D"EMailAddress"/>
		</method>
		<method name=3D"IndexOf" return=3D"int">
			<param name=3D"email" type=3D"EMailAddress"/>
		</method>
		<method name=3D"FindByName" return=3D"int">
			<param name=3D"name" type=3D"string"/>
		</method>
		<method name=3D"FindByValue" return=3D"int">
			<param name=3D"value" type=3D"value"/>
		</method>
		<method name=3D"Get" return=3D"EMailAddress">
			<param name=3D"index" type=3D"int"/>
		</method>
		<method name=3D"RemoveAt" return=3D"EMailAddress">
			<param name=3D"index" type=3D"int"/>
		</method>
		<method name=3D"Remove" return=3D"void">
			<param name=3D"email" type=3D"EMailAddress"/>
		</method>
		<method name=3D"RemoveFirst" return=3D"EMailAddress">
			<param name=3D"name" type=3D"string"/>
		</method>
		<method name=3D"Remove" return=3D"EMailAddress[]">
			<param name=3D"names" type=3D"string[]"/>
		</method>
		<method name=3D"ToString" return=3D"string">
			<param name=3D"index" type=3D"int"/>
		</method>
		<implements>
			<interface name=3D"IAddressList"/>
			<interface name=3D"IEnumerable"/>
		</implements>
	</class>
	<class name=3D"InternetAddressList">
		<property name=3D"Empty" type=3D"InternetAddressList" allow=3D"get"/>
		<method name=3D"ctor"/>
		<method name=3D"ctor">
			<param name=3D"addresses" type=3D"InternetAddress[]"/>
		</method>
		<method name=3D"ctor">
			<param name=3D"list" type=3D"InternetAddressList"/>
		</method>
		<method name=3D"Item" return=3D"InternetAddress">
			<param name=3D"index" type=3D"int"/>
		</method>
		<method name=3D"Add" return=3D"int">
			<param name=3D"address" type=3D"InternetAddress"/>
		</method>
		<method name=3D"Add" return=3D"int">
			<param name=3D"addresses" type=3D"InternetAddressList"/>
		</method>
		<method name=3D"Clear" return=3D"void"/>
		<method name=3D"Set" return=3D"void">
			<param name=3D"index" type=3D"int"/>
			<param name=3D"address" type=3D"InternetAddress"/>
		</method>
		<method name=3D"IndexOf" return=3D"int">
			<param name=3D"address" type=3D"InternetAddress"/>
		</method>
		<method name=3D"FindByValue" return=3D"int">
			<param name=3D"address" type=3D"string"/>
		</method>
		<method name=3D"Get" return=3D"InternetAddress">
			<param name=3D"index" type=3D"int"/>
		</method>
		<method name=3D"Remove" return=3D"void">
			<param name=3D"address" type=3D"InternetAddress"/>
		</method>
		<method name=3D"RemoveAt" return=3D"InternetAddress">
			<param name=3D"index" type=3D"int"/>
		</method>
		<method name=3D"RemoveFirst" return=3D"InternetAddress">
			<param name=3D"address" type=3D"string"/>
		</method>
		<method name=3D"Remove" return=3D"InternetAddress[]">
			<param name=3D"addresses" type=3D"string[]"/>
		</method>
		<method name=3D"ToString" return=3D"string">
			<param name=3D"index" type=3D"int"/>
		</method>
		<implements>
			<interface name=3D"IAddressList"/>
			<interface name=3D"IEnumerable"/>
		</implements>
	</class>
</csmail>

------=_NextPart_000_0031_01C1A722.119B4680--