EmiaCtrlLite | Emia4Win | DecMsgX | DecMime |
Emia4Win (emia.exe)Documentation 2004-11-25 | Back |
Description: |
Emia4Win is a bare-bone command line driven IMAP/POP3/SMTP package for sending and retrieving electronic mail. It can be used as a utility/component with the intent to give Web/Internet Applications, Email Capabilities. It can be incorporated into any application regardless of what language is used. Primary purpose is to to make it easier and faster for a developer to create a full fledged webmail application, or on a small scale with limited budget or resources. |
TOC |
|
[TOP]Emia Syntax |
|
[TOC] SMTP Send Syntax: emia
[--mse]
snd /svr:[ s ] /port:[ p ] /se:[ s@a ] /re:[ r@a ] *Note - Special Syntax required for Window's mail-servers.: --mse: flag for communicating with MS Exchange Server. s: Mail Server
eg. mail.host.com [TOC]
POP3
Retrieve Syntax: [TOC] IMAP Retrieve and Management Syntax: emia [--mse] imap /svr:[s] /port:[p] /id:[i] /pass:[pw] [/box:[b]] /a:[a] (ARGS) *Note - Special Syntax required for Window's mail-servers.: --mse: flag for communicating with MS Exchange Server. s: IMAP mail server (eg: mail.domain.com) create boxlist delbox delmsgs copy backup stat list message [TOC] POP3 Advanced Syntax (Chain) User Defined ordered list of commands Chain Config Syntax emia [--mse] chain [uid=[uid] /svr:[s] /port:[p] /id:[i] /pass:[pw] [/out:[dir]]] *Note - Special Syntax required for Window's mail-servers.: --mse: flag for communicating with MS Exchange Server. uid: tag to associate
with mailbox eg. /mail/[uid] Chain example: eg: emia
chain [uid=me /svr:mail.host.com /port:110 /id:myid /pass:mypass /out:mailbox]
[get /a:list] [get /a:stat] [get /a:message /msg:1 /DEL:0] [del msg:1,2,3] [TOC]
Misc.
Syntax: Del Syntax: s: POP3 mail server
(eg: mail.domain.com) Del Syntax
|
|
[TOP] ASE.ini (Anti-Spam-Engine) |
|
Emia4Win comes with a "Spam Alert" System. below is a sample configuration for dealing with Spam. ----ASE.ini----- SUBKW: This line
is for keywords that would appear in the subject header of possible spam
messages. Each keyword is delimited by a comma. |
|
[TOP] Emia4Win Version History |
|
version 2002.04.26 |
[TOP] (Trouble Shooting) |
||||||
|
[TOP]Sending Mail via perl/CGI |
[TOP] |
example code snippet $| = 1; my $emia = "../emia.exe"; print MAIL "$message\n"; |
[TOP]Checking Mail via perl/CGI |
Check Mail example use CGI; $| = 1; my $formmail = new CGI; checkmail(); sub checkmail { |
[TOP]Retrieving Mail via perl/CGI |
Retrieve a Message example use CGI; my $formmail = new CGI; $| = 1;
sub getmsg {
|
[TOP]Deletion of Mail while retrieving it off server via perl/CGI |
Deletion example use CGI; my $formmail = new CGI; $| = 1;
sub getmsg {
|
[TOP]Explicitly delete Mail off server via perl/CGI |
Deletion example use CGI; my $formmail = new CGI; $| = 1;
sub delmsgs { |
[TOP]Explicitly Check the mail box STAT via perl/CGI |
Deletion example use CGI; my $formmail = new CGI; $| = 1;
sub delmsgs { ... |
[TOP]Emia for VBScript/VBA/ASP Overview |
||
Emia4win
now supports VBScript/VBA/ASP/ASP.NET, by deploying a component DLL that
takes care of the processes we call "EmiaCom". It requires that
you have the Microsoft
.NET Framework Redistributable installed. *EmiaCom.dll is not standalone.
It requires Emia4Win (emia.exe). Once installed, you must register the
component by typing at the console "regasm EmiaCom.dll /tlb /codebase" Please Note: In order to use EmiaCom with ASP on IIS, you must set "Application Protection" to "Low" and "Execute Permissions" to "Scripts only" or "Scripts and Executables" under the "Home Directory" Tab in website properties.
|
||
METHODS for
POP (Retrieving,Checking and Deleting Mail)
*slice eg. ( "1-5" etc) Chain Methods(For
advanced POP Transactions)
*chunk eg. for lists of 5 headers, do 5 METHODS for
IMAP(Functionality and Management)
|
||
[TOP]Sending Mail via VBScript/ASP | ||
example
code snippet set mailer = CreateObject("EmiaCom.legacy")
|
[TOP]Checking Mail via VBScript/ASP |
Check
mail example snippet dim mailserver,port,id,pass,mail,list,emiapath
<html> <table width="90%"
border="1" align="center">
Set R1 = New RegExp With R1 dim data,stripnewlines
for each p in listlines |
[TOP]Retrieving Mail via VBScript/ASP |
Retrieve
message example snippet dim mailserver,port,id,pass,mail,message,msgnum,DEL,EMIAPATH
messagelines = split(message,newline)
|
[TOP]Checking STAT via VBScript/ASP |
... Option Explicit dim mailserver,port,id,pass,mail,sstat,EmiaPath ... |
[TOP]Deletion of Mail off server via VBScript/ASP |
Deletion
example snippet dim mailserver,port,id,pass,mail,msgnums,EmiaPath dim mailserver,port,id,pass,mail,msgnums,EmiaPath %> |
[TOP]Sending Mail via PHP |
|
... <?php $f = popen('emia snd
/svr:mail.host.com /port:25 /se:'.$senderaddress.' /re:'.$recipaddress.'
2>&1', 'w');
|
[TOP]Checking Mail via PHP |
|
[TOP]Retrieving Mail via PHP |
... ... |
[TOP]Deletion of Mail while retrieving it off server via PHP |
... ... |
[TOP]Explicitly check the STAT via PHP |
... ... |
[TOP]Explicitly delete Mail off server via PHP |
... ... |
[TOP]Retrieving Mail via Python |
... output= os.popen('emia
get /svr:mail.host.com /port:110 /id:noneofyourbiz /pass:likeiwould /a:message
/msg:1 /DEL:0','r') print message
... |
[TOP]Deletion of Mail while retrieving it off server via Python |
... output= os.popen('emia
get /svr:mail.host.com /port:110 /id:noneofyourbiz /pass:likeiwould /a:message
/msg:1 /DEL:1','r') print message
... |
[TOP]Explicitly checking STAT via Python |
... output = os.popen('emia
get /svr:mail.host.com /port:110 /id:noneofyourbiz /pass:likeiwould /a:stat','r') print stat ... |
[TOP]Explicitly delete Mail off server via Python |
... output = os.popen('emia
del /svr:mail.host.com /port:110 /id:noneofyourbiz /pass:likeiwould /msg:1','r') ... |
©
2002/2003 Jeremy Aiyadurai
. All Rights Reserved |