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.21
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 propertyAttachmentCount
**Missing documentation **
(Inherited from CMessage.)
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 propertyAttachmentList
**Missing documentation **
(Inherited from CMessage.)
Public propertyBCCList
Array of strings containing the e-mails of all blind carbon copy (BCC) recipients.
Public propertyBody
**Missing documentation **
(Inherited from CMessage.)
Public propertyBodyHtml
**Missing documentation **
(Inherited from CMessage.)
Public propertyBoundary
String value used as boundary for different e-mail parts.
Public propertyCargo
**Missing documentation **
(Inherited from CMessage.)
Public propertyCCList
Array of strings containing the e-mails of all carbon copy (CC) recipients.
Public propertyContentType
A string representing the content type for that section.
(Inherited from CMessage.)
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 propertyError
A number representing the error most recently occurring.
(Inherited from CMessage.)
Public propertyErrorMsg
A string representing the details of the last error.
(Inherited from CMessage.)
Public propertyFrom (Inherited from CMessage.)
Public propertyFromAddress
A string representing the email address of the sender.
(Inherited from CMessage.)
Public propertyFromName
A string representing the name of the sender.
(Inherited from CMessage.)
Public propertyHEADER
**Missing documentation **
(Inherited from CMessage.)
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 propertyMailBody
A string representing the entire contents of the body of the email. This will include all attachments and multi-part extensions.
(Inherited from CMessage.)
Public propertyMailDate
Returns the creation date of the message.
(Inherited from CMessage.)
Public propertyMailHeader
A string representing the entire header contents for the email.
(Inherited from CMessage.)
Public propertyMailPriority
Numeric value representing the e-mail priority.
Public propertyMailTime
Returns the creation time of the message as a string.
(Inherited from CMessage.)
Public propertyMessageID
A string representing the ID of the email.
(Inherited from CMessage.)
Public propertyPriority
**Missing documentation **
(Inherited from CMessage.)
Public propertyReferences
**Missing documentation **
(Inherited from CMessage.)
Public propertyReplyTo
**Missing documentation **
(Inherited from CMessage.)
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 **
Public propertySubject
**Missing documentation **
(Inherited from CMessage.)
Public propertyTimeStamp
Returns the creation date and time of the message as a Time-stamp string.
(Inherited from CMessage.)
Public propertyTransferEncoding
A string representing the Transfer encoding type for the current section.
(Inherited from CMessage.)
Top
Methods
  NameDescription
Public methodAddAttachment
Adds an attachment to the email.
Public methodBodyExtract
**Missing documentation **
(Inherited from CMessage.)
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 methodDecodeAndSaveAs
This is an abstract method called by CMessage:SaveAs() If the code type is unknown. This method can be provided by the developer to implement unsupported code types.
(Inherited from CMessage.)
Public methodDeleteAttachment
Adds an attachment to the email.
Public methodFakeAttachmentList
Gets the original file names of the attachment(s).
(Inherited from CMessage.)
Public methodGetAttachInfo
Retrieves information about attachment(s).
(Inherited from CMessage.)
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 methodSetMailTime
Converts the current time and date into an Internet timestamp string for the current message object.
(Inherited from CMessage.)
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