Click or drag to resize

CEmail Class

X#
Provide a class to store and decode all data for an e-mail.
Inheritance Hierarchy
Object
  CMessage
    CEmail

Namespace:  VO
Assembly:  VOInternetClasses (in VOInternetClasses.dll) Version: 2.24 GA
Syntax
 CLASS CEmail INHERIT CMessage
Request Example View Source

The CEmail type exposes the following members.

Constructors
  NameDescription
Public methodCEmail
Construct a CEmail object.
Top
Properties
  NameDescription
Public propertyAttachmentFileList
Array containing the names of the attached files.
(Overrides AttachmentFileList.)
Public propertyAttachmentInfo
Returns or sets the information about all attachments as a single string. For each attachment there is a separate line. Each line contains: The Fully qualified filename, Content Type, Encoding, ID, Size, ContentId
Public propertyBCCList
Array of strings containing the e-mails of all blind carbon copy (BCC) recipients.
Public propertyBoundary
String value used as boundary for different e-mail parts.
Public propertyCCList
Array of strings containing the e-mails of all carbon copy (CC) recipients.
Public propertyDestList
Array of strings containing the e-mail addresses of all recipients.
Public propertyDispositionNotification
A string containing the email address of a party to be notified that the email was received. This is sometimes replaced with a Return Receipt by some email clients.
Public propertyHTMLText
A properly formed HTML text string suitable for display in a web browser pane. If the email did not contain an HTM component, one is formed from the Text component by wrapping it in appropriate tags. If the email did contain HTML and had embedded images (marked with src="cid:) then these references will be replaced with references to the actual files names of these images.
Public propertyMailPriority
Numeric value representing the e-mail priority.
Public propertyReturnReceipt
A string containing the email address of a party to be sent a receipt advice. Some email clients may use this to contain a return receipt and others may use Disposition Notification instead.
Public propertySize
**Missing documentation **
Top
Methods
  NameDescription
Public methodAddAttachment
Adds an attachment to the email.
Public methodCloneAttachments
Clones the internal Attachment array.
Public methodCreateHtml
Creates a HTML body based on the text body of the email message.
Public methodCreateReplyBody
Prepares a default text response.
Public methodDecode
Extract all information from the various parts of an e-mail.
(Overrides Decode(Usual).)
Public methodDeleteAttachment
Adds an attachment to the email.
Public methodGetAttachmentInfo
Method to decode all header elements of an email
Public methodGetHeaderInfo
Method to decode all header elements of an email
(Overrides GetHeaderInfo.)
Public methodMimeEncode
Method to encode a string using a specific encoding or the default encoding of an email
Public methodMimeHeader
Method to encode an MIME Attachment header
Public methodSaveAs
Decode and save the specified encoded attachment of an e-mail as a local file.
(Overrides SaveAs(Usual, Usual, Usual).)
Public methodSetAttachmentInfo
This method allows you to replace elements of the internal attachment array of the email object.
Public methodSetHeaderInfo
Method to encode all header elements of an email
Public methodStreamIn
This method gets called when an email messages is received. It calls into the Storage object to decode and store attachments.
Public methodStreamOut
Generate message contents
Public methodStreamStart
Initialize the Stream Status of an email message.
Top
Remarks
This class provides all necessary methods and properties for checking and receiving e-mail from an Internet POP Server. The class decodes email text string passed into its header components only. HTML and attachment components are decoded as required.
Examples
X#
 1FUNCTION SMTPSendMail       (cServerIP      AS STRING,;
 2     cMailSubject   AS STRING,;
 3     xDestUser      AS USUAL,;
 4     xCCUser        AS USUAL,;
 5     cBody          AS STRING,;
 6     cFromAddress   AS STRING,;
 7     xAttachFile    AS USUAL,;
 8     cFromName      AS STRING,;
 9     xBCCUser       AS USUAL,;
10     cCargo         AS STRING)   AS LOGIC PASCAL
11  LOCAL oSmtp    AS CSMTP
12  LOCAL lRet     AS LOGIC
13  LOCAL oEmail   AS CEmail
14  oEMail := CEmail{}
15  oEmail:FromAddress   := cFromAddress
16  oEmail:FromName      := cFromName
17  oEmail:Cargo         := cCargo
18  oEmail:Subject       := cMailSubject
19  oEmail:DestList      := xDestUser
20  oEmail:CCList        := xCCUser
21  oEmail:BCCList       := xBCCUser
22  oEmail:MailBody        := cBody
23  IF !IsNil(xAttachFile)
24     oEmail:AttachmentFileList := xAttachFile
25  ENDIF
26  oSmtp := CSmtp{oEmail}
27  oSMtp:RemoteHost  := cServerIP
28  oSmtp:TimeOut := 5000
29  lRet := oSmtp:SendMail()
30  RETURN lRet
See Also CLASS CPop, CLASS CSmtp, Class CStorage
See Also

Reference