📄 temail2.htm
字号:
<!doctype html public "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Stefan Hoffmeister">
<title>TEmail Readme File</title>
</head>
<body>
<center><h2>TEmail: MAPI component (V2.10.0)</h2></center>
<center><h3>
<a href="mailto:Danny.Heijl@cevi.be">Danny Heijl</a>
<a href="http://www.cevi.be/pp/danny/dhe.htm">[URL]</a>
</h3></center>
<center><h3>
<a href="mailto:Stefan.Hoffmeister@Econos.de">Stefan Hoffmeister</a>
<a href="http://www.econos.de/">[URL]</a>
</h3></center>
<hr size="3">
<p>TEmail is a non-visual component that allows you to send and receive e-mail
on any Windows 3.x or Windows 95 or Windows NT PC that has MAPI-compatible
e-mail provider software installed.
<p>MAPI is an acronym for Microsoft's "Messaging Application Programming Interface".
<p>Microsoft Mail, Microsoft Exchange, Microsoft Messaging client software, and
Novell GroupWise client software are examples of MAPI providers.
<p>They all supply "Simple MAPI" services via MAPI(32).DLL.
<p><b>Note: If support for MAPI has not been installed on your system, you will not be
able to <i>test</i> your application that uses TEmail!</b>
<p>You can <i>develop</i> without MAPI support though.
<p>The component will also test the availability of MAPI at runtime.
<hr size="3">
<ol>
<li><a href="#instructions">Installation Instructions</a></li>
<li><a href="#description">Component Description</a></li>
<li><a href="#history">History, Authors and Credits</a></li>
</ol>
<hr>
<a name="instructions"></a>
<h3>1. Installation instructions :</h3>
<table border="2">
<tr>
<td>1. Unzip Temail2.zip to a temporary directory</td>
</tr>
<tr>
<td>2. Copy compon\*.* to your component directory</td>
</tr>
<tr>
<td>3. Installation for
<ul>
<li>
<b>Delphi 1</b>: Install <b>email16.pas</b> into your component library
and rebuild the component library.
<br>Add <b>email.kwf</b> to your help system using helpinst.exe and copy
<b>email.hlp</b> to the Delphi \BIN directory.
</li>
</ul>
<ul>
<li>
<b>Delphi 2 and C++ Builder 1.0</b>: Install <b>email32.pas</b> into your component library
and rebuild the component library.
<br>Add <b>email.kwf</b> to your help system using helpinst.exe and copy
<b>email.hlp</b> and <b>email.cnt</b> to the respective \BIN directory.
</li>
</ul>
<ul>
<li>
<b>Delphi 3</b>: Either install <b>email32.pas</b> into one of your user-defined
packages, or open (File | Open) <b>email3.dpk</b> and press Install.
<br>Copy <b>email.hlp</b> and <b>email.cnt</b> to your Delphi \HELP directory,
open DELPHI3.CFG in \HELP with a text editor and add to the end of this
file the text:
<ul><tt>; TEmail Help</tt>
<br><tt>;------------</tt>
<br><tt>:Link email.hlp</tt></ul>
Finally delete DELPHI3.GID.
</li>
</ul>
<ul>
<li>
<b>C++ Builder 3.0:</b> Either install <b>email32.pas</b> into one of your
user-defined packages, or open (File | Open) <b>email3.bpk</b> and press Install.
<p>Copy <b>email.hlp</b> and <b>email.cnt</b> to your C++ Builder \HELP folder,
then Help | Customize... your online help to include this help file.
</ul>
<ul>
<li>
<b>Delphi 4:</b> Either install <b>email32.pas</b> into one of your
user-defined packages, or open (File | Open) <b>email4.dpk</b> and
press Install.
<p>
Copy <b>email.hlp</b> and <b>email.cnt</b> to your Delphi 4 \HELP
folder, then Help | Customize... your online help to include this help file.
</ul>
</td>
</tr>
<tr>
<td>4. From this moment on you can play with the provided demo applications.
<p>You may want to have a look at the FAXDEMO directory, which contains
another demonstration of how to use the component with MAPI Fax support.
<p>Alternatively you can play with the "TEmail" component itself.</td>
</tr>
</table>
<hr>
<a name="description"></a>
<h3>2. Component Description :</h3>
<h4>Published properties (design-time) :</h4>
<ul>
<li>
<b>Acknowledge</b> : Boolean : sendmail sets receipt requested</li>
<li>
<b>Attachment</b> : TStrings with attachment file names</li>
<li>
<b>CC</b> : TStrings with CC</li>
<li>
<b>BCC</b> : TStrings with BCC</li>
<li>
<b>DownLoadFirst</b> : Boolean : MAPI will first get new mail messages before
returning from Logon if set to True. If left False, Logon will return immediately
and new mail will be fetched in background.</li>
<li>
<b>MAPIAvail</b> : Boolean read-only flag tells if MAPI services are present.</li>
<li>
<b>NewSession</b> : Boolean to select whether to unconditionally start a new MAPI session.</li>
<li>
<b>Password</b> : the logon password</li>
<li>
<b>Profile</b> : the Exchange logon profile (or MSMAIL logon id) defaults to Exchange
DefaultProfile from registry when running on a Win32 system</li>
<li>
<b>Recipient</b> : TStrings with recipients</li>
<li>
<b>ShowDialog</b> : lets you use the standard Mail clients editor</li>
<li>
<b>Subject</b> : Pascal (short)string with subject</li>
<li>
<b>Text</b> : Pascal (short)string with (short) message body text</li>
<li>
<b>TruncAttFN</b> : determines whether to truncate the filename of an attachment</li>
<li>
<b>UnreadOnly</b> : Boolean : retrieves only new messages with GetNextMessageID</li>
<li>
<b>UseDefProfile</b> : Boolean : lets you use the Exchange default profile (this
also works for a 16bit application running on a 32bit Windows)</li>
</ul>
Logon profile and password are not needed if you are already logged on.
<br>If you are not logged on, you can leave them blank, a logon dialog
box will pop up.
<p><b>Public methods</b> :
<ul>
<li>
<b>function SetLongText</b> : PChar : sets pointer to long message text</li>
<li>
<b>function GetLongtext</b> : PChar : gets pointer to long message text</li>
<li>
<b>function Logon</b> : integer : mapi logon</li>
<li>
<b>function Logoff</b> : integer : mapi logoff</li>
<li>
<b>function CheckRecipient</b> : (short)string returns valid recipient</li>
<li>
<b>function CheckAttachment</b> : (short)string returns valid attachment</li>
<li>
<b>procedure Clear</b> : invalidate and clear a number of message fields</li>
<li>
<b>function SendMail</b> : integer : sends mail</li>
<li>
<b>function SaveMail</b> : integer : saves mail</li>
<li>
<b>function CountUnread</b> : integer : counts unread messages</li>
<li>
<b>function GetNextMessageId</b> : (short)string : gets next message id</li>
<li>
<b>function ReadMail</b> : integer : reads a mail by message id</li>
<li>
<b>function Address</b> : check all addresses in recipient stringlists allows
user to add addresses with dialog box pop-up</li>
<li>
<b>function CopyAttachment(index, destination, deleteflag)</b> : integer, copies
a given attachment from it's temp location to a destination pathname optionally
deleting the temporary copy.</li>
<li>
<b>procedure DownLoad</b> : will get new mail by logging off, setting DownLoadFirst
to True, and loggin on again.</li>
</ul>
<h4>
Public properties (runtime) :</h4>
<ul>
<li>
<b>AttPathNames</b> : TStrings with received attachment temp pathnames if NoAttachments
was False on ReadMail.</li>
<li>
<b>DateRecvd</b> : (short)string : date received (ReadMail)</li>
<li>
<b>HeaderOnly</b> : boolean : ReadMail returns "envelope only"</li>
<li>
<b>LeaveUnread</b> : boolean : ReadMail does not flag read messages "read"</li>
<li>
<b>MessageId</b> : (short)string : message id for ReadMail and DeleteMail, returned
by GetNextMessageId</li>
<li>
<b>MessageType</b> : (short)string : message type</li>
<li>
<b>Originator</b> : (short)string : message originator (readmail)</li>
<li>
<b>OrigAddress</b> : (short)string, mail address of originator</li>
<li>
<b>Unread</b> : boolean : message was already marked "read" flag (ReadMail)</li>
<li>
<b>NoAttachments</b> : boolean : ReadMail does not retrieve attachments If set
False : attachments are copied to a temporary location, you get the temporary
pathnames in the AttPathNames stringlist.</li>
</ul>
<h4>
<b>Take care:</b> If you set NoAttachments to false, then .ReadMail will put the
attachments in a temp directory, and you have to delete them yourself,
or call .CopyAttachment with the delete_after_copy flag set to True!</h4>
<hr>
<a name="history"></a>
<h3>3. History:</h3>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -