Created an OCX with send + receive mail functionality. Copy the
file POSTIEX.DLL to your windows system directory and register it with the
REGSVR32 program...

	> cd \winnt\system32
	> regsvr32 atl.dll
	> regsvr32 postiex.dll

You may also need a copy of ATL.DLL from Microsoft (or grab atl.zip from my site) which you
must FIRST register as above.

The test ASP script POSTIEX.ASP should show you everything needed to get going, the
following is a guide...


Invocation...

	Set postie = Server.CreateObject("Postie.Postie")


Sending-mail method summary...

	postie.ConnectSmtp(BSTR host, BSTR service)
	postie.ConnectNntp(BSTR host, BSTR service)

		... where 'service' is usually "smtp" or 25 for mail, and "nntp" or 119 for news.


	postie.SetCharset(BSTR charset)

		... where 'charset' is the name of a character-set encoding eg. "ISO-8859-5" for
		Cyrillic, or "ISO-8859-7" for Greek, or "ISO-8859-2" for Central European". The
		default is "ISO-8859-1" for Western (English).


	postie.Attach(BSTR filename)

		... attachments are only cleared after a disconnect (or ClearAttachments() call).


	postie.Post(BSTR from_addr, BSTR to_addr, BSTR subject, BSTR msg, short html, short alt)

		... where 'html' is 1 for HTML or 0 for plain-text, and 'alt' is 1 for a plain-text
		alternative to HTML (if 'html' is plain-text then the value of 'alt' is irrelevant).


	postie.ClearAttachments()


	postie.Disconnect()


Reading-mail method summary...

	postie.ConnectPop3(BSTR host, BSTR service)
	postie.ConnectImap4(BSTR host, BSTR service)

		... where 'service' is usually "pop3" or 110 for POP, and "imap2" or 143 for IMAP servers.


	postie.Login(BSTR userid, BSTR password)

	short postie.GetCount()

		... returns the number of messages in the inbox.


	postie.Retrieve(short n, short brief, short extract)

		... reads in the specified message (starting at 1 if there are messages). Where
		the whole message (including the body) is read in if brief is 0, or just the headers (no
		message body) if brief is set to 1. If text attachments are present they are inlined
		into the message body if extract is zero. IMAP4 folders are not yet catered for
		(access defaults to the INBOX).

	
	BSTR postie.GetTo()
	BSTR postie.GetReplyTo()
	BSTR postie.GetFrom()
	BSTR postie.GetSubject()
	BSTR postie.GetDate()
	BSTR postie.GetBody()
	BSTR postie.GetMimeType()

	short postie.GetAttachmentCount()

		... returns the number of attachments in the message.


	BSTR postie.GetNextAttachment(BSTR path)

		... get the next attachment and save it in the specified path under the returned
		filename. The returned filename is the name specified in the attachment (e.g. 'message.txt') and
		does not (hopefully) include any path information. Combine this with the given path (e.g. "c:\temp")
		to get the file-spec where the attachment has been saved (e.g. "c:\temp\message.txt").


	postie.Delete(short n)

	postie.Disconnect()


Property summary...

	long postie.Status()

		... where a value <= 0 indicates an error.


Clean-up...


	Set postie = Nothing





