//------------------------------------------------------------------------------------------------- //POP3 Interface //------------------------------------------------------------------------------------------------- CMailCOM.POP3.1 MailDomain -(Property, READ)Get mail server domain(only for single domain) LastResponse -(Property, READ)Current system response message(+OK or -ERR) CreateUserPath Account -(Method)Create the account's POP3 work path Login Account, Password -(Method)Login pop3 server(the Account is made up with form as 'Account:IP'(Account and it's IP address) LoginSuccess -(Property, READ, BOOL)If login successfully, LoginSucc = 1 else 0 GetMailBoxInfo -(Method)Get mail box info MailCount -(Property, READ, long)how many mails in the mail box GetMailInfo indexOfMail -(Method)get No. indexOfMail(based 1) mail info From -(Property, READ)sender address To -(Property, READ)receiver address Subject -(Property, READ)subject of mail Date -(Property, READ)date of mail Size -(Property, READ, long)size of mail IsRead -(Property, READ, BOOL)if mail is read or not UID -(Property, READ)UID of mail IsReply -(Property, READ, BOOL)if mail is replied or not IsForward -(Property, READ, BOOL)if mail is fowarded or not Permission -(Property, READ, BOOL)the account's permission(0=general account, 1=domain admin, 2=system admin) GetMailData indexOfMail -(Method)get No. indexOfMail mail data Body -(Property, READ)mail body BodyHtmlURL -(Property, READ)HTML link of mail(if the mail is html form) HeaderURL -(Property, READ)URL of mail header EmailURL -(Property, READ)URL of original mail AttachCount -(Property, READ, long) attachements count GetAttachInfo indexOfAttach -(Method) get No. indexOfAttch attachement info AttachURL -(Property, READ)url for downloading attachement file AttachFileName -(Property, READ)get attachement file name Download urlOfAttach -(Method)download the url DeleteMailByUID strUID -(Method)Delete mail by UID Logout Account -(Method)Logout MoveToInbox strUID -(Method)move mail to inbox MoveToFolder strUID -(Method)move mail to folder DeleteMailEx strUID -(Method)delete mail in Folder GetMailDataEx strUID -(Method)get mail data in folder GetMailInfoEx strUID -(Method)get mail info in folder GetRemotePOP3 -(Method)retr POP3 mails SetReplySign bReply, bsUID, nFolder -(Method)Set mail is replied. nFolder=0 means inbox and 1 means other folders. SetForwardSign bForward, bsUID, nFolder -(Method)Set mail is forwarded. nFolder=0 means inbox and 1 means other folders. //------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------- //SMTP Interface //------------------------------------------------------------------------------------------------- CMailCOM.SMTP.1 LastResponse -(Property, READ)server response CreateUserPath Account -(Method)create Account's SMTP work path StartUpload Request -(Method)start post mail form SetSubject formfieldofSubject -(Method)set subject SetBody formfieldofBody -(Method)set body SetFrom formfieldofFrom -(Method)set sender address SetTo formfieldofTo -(Method)set receiver addresses SetCc formfieldofCc -(Method)set cc addresses SetBcc formfieldofBcc -(Method)set bcc addresses SetMaxFileSize longSize -(Method)set attachement file size AddAttach formname -(Method)set attachement file name Subject -(Property, READ, WRITE)Set or get "subject" Body -(Property, READ, WRITE)Set or get "body" From -(Property, READ, WRITE)Set or get "from" To -(Property, READ, WRITE)Set or get "to" Cc -(Property, READ, WRITE)Set or get "cc" Bcc -(Property, READ, WRITE)Set or get "bcc" Attachment -(Property, READ, WRITE)Set or get "attachment" list Reply -(Property, WRITE)Set reply address SaveMessage -(Property, WRITE)Set save message to sent folder SaveDraft -(Property, WRITE)Set save message to draft folder ContentType -(Property, WRITE)Set the email format(can be "text/plain" or "text/html") SendMail -(Method)send mail UID -(Property, READ)after clients send an email, the email will be saved to outbox automatically, and UID is the email's UID in the folder. //------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------- //account manager interface //------------------------------------------------------------------------------------------------- CMailCOM.Admin.1 LastResponse -(Property, READ)server response Login Account, Password -(Method)login account manager server LoginSuccess -(Property, READ, BOOL) login successfully or not Password -(Property, WRITE)password UserName -(Property, READ/WRITE)account own name Comment -(Property, READ/WRITE)account comment POP3Server -(Property, READ/WRITE)POP3Server POP3Mail -(Property, READ/WRITE)POP3Mail POP3Password -(Property, READ/WRITE)POP3Password LeaveCopy -(Property, READ/WRITE, BOOL)leave a copy on the remote pop3 server Signup Account -(Method)create account Modify Account, Password -(Method)modify account's password Destroy Account, Password -(Method)delete account //advanced admin interface AuthLogin Account, Password -(Method) login Open Object, Information -(Method) set manage object and operation (object can be account or domain) Value(Field) -(Property, READ/WRITE)get or set account's item property GetData(index) -(Method)get record Edit(index) -(Method)edit record Delete(index) -(Method)delete record MoveUp(index) -(Method)moveup record MoveDown(index) -(Method)movedown record AddNew -(Method)add new record Update -(Method)update record Count -(Property, READ)record count [Description] Open Object, Information supports following parameters: Open Object, "EmailPOP3RemoteInfo" - operate pop3 remote information (refer to setpop.asp) Open Object, "EmailForwardInfo" - operate email forward information (refer to setforward.asp) Open Object, "EmailFilterInfo" - operate email filter information (refer to setfilter.asp) Open Object, "EmailAutoReplyInfo" - operate email auto reply (refer to setautoreply.asp) Open Object, "AccountInfo" - operate account info (refer to setpersoninfo.asp) Open Object, "AccountListInfo" - operate account manager (refer to admin.asp) Open Object, "DomainInfo" - operate domain information (refer to sysadmin.asp) //------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------- // Examples //------------------------------------------------------------------------------------------------- //How to send mail by ASP Webmail Set objSMTP= CreateObject("CMailCOM.SMTP.1") objSMTP.CreateUserPath("ASPMail:" & Request("REMOTE_ADDR")) objSMTP.Subject = "Subject" objSMTP.Body = "Body" objSMTP.To = "to@mail.com" objSMTP.From = "from@mail.com" 'objSMTP.ContentType = "text/plain" 'send mail in text format 'objSMTP.ContentType = "text/html" 'send mail in html format objSMTP.SendMail Set objSMTP = Nothing //How to create an account Set objAccount = CreateObject("CMailCOM.Admin.1") objAccount.UserName = "test" objAccount.Password = "password" objAccount.Comment = "test for creating account" objAccount.Signup "test" Set objAccount = Nothing //-------------------------------------------------------------------------------------------------