Wrapper for the Mail Client System MAPI (work with Microsoft Outlook, Outlook Express, Lotus Notes ...)
An email program must be installed.
For Microsoft products is a safety system active that prevents that third-party programs such as beas can send emails on the MAPI interface.
This must be bypassed if necessary (eg using the program "ClickYes").
This object don't work on all System! Don't use it, if you work with Windows Vista or newer.
better alternative: Direct Send with api_chilkat or use of the SAP Message System.
Example api_chilkat: object=ue_api_chilkat=sendmail=receipt;receipt;..=subject=text=file
this object can be declared with: declare=[objektname]=ue_api_mail
logon |
Logon to the actual EMail-Client.(e.g. OutlookExpress) inc. Command to Download Email. |
logoff |
Logoff |
getmail |
Get Email and save values into mailmsgid, mailmsgdate, mailmsgtime, mailmsgsubject, mailtext, mailfromid,mailfromname, mailfromcardcode as Array. ArraySize will be stored into mailcount.
If mailmsgid will be provided as Parameter than you can also hand over an Attachment. Attachment is also an Array it consists out of: mailfilenameX Filename without path mailfilepathX Filename with path mailfilecount Count of files |
deletemessage |
Delete Message |
sendmessage |
Create and send a new Message sendmessage=emailadresse=subject=text
You can set the Attachment with
object=lmail=ue_api_mail lmail=attachment=file=<filename>=<description> lmail=attachment=file=<filename>=<description> ... lmail=sendmessage=<emailadresse>=<subject>=<text> destroy=lmail
cc-Adress you can set with lmail=cc=email-address> lmail=sendmessage=...
|
copytofileref |
Copy the last Email that has been fetched with getmail=x into the Table "beas_fileref" and any Attachement into the Table "beas_filereffile" copytofileref=<typ>=<id> You need to provide the Parameters to find the copy later on. typ=beas_fileref.typ = describes to which Program functions it belongs id =beas_fileref.id = unique ID
|
deletetemporyfiles |
Deletes all Attachement files which has been fetched with getmail=X . IMPORTANT! Need to execute or you will have data garbage. IMPORTANT! STRICTLY RUN! Otherwise creating of data garbage |
Example:
declare=mail=ue_api_mail
mail=logon
mail=getmail
for=loop=1=<mailcount>
mail=getmail=<mailmsgid[loop]>
mail=copytofileref=test=test
next
mail=logoff
destroy=mail
opennewwindow=system_fileref_browse.psr=s_parm1:test,s_parm2:test