Top Method Summary
Options Name Purpose
DownloadFile (character, character) Downloads a file from a specified web address to a given file
LONGCHAR DownloadString (character) Downloads a string from a specified web address to a given file
LONGCHAR DownloadString (character, HttpStatus) Downloads a string from a specified web address to a given file
LOGICAL EmailCheckDomainLabel (character) Validates a single label of a domain name
LOGICAL EmailCheckDomainName (character) Validates that every label of a domain name consists of valid characters only
LOGICAL EmailCheckDotAtom (character) Validates that a DotAtom of an EmailAddress consists of valid characters only.
LOGICAL EmailSplitParts (character, character, character) Splits an EmailAddress into Local Part and Domain
LOGICAL EmailVerifyDomain (character, logical) Verifies a Domain Name on character base and if wanted by checking the domains MX record
LOGICAL EmailVerifyLocalPart (character) Verifies a LocalPart on character base
CHARACTER HostFromUrl (character) Extracts the Host portion from an URL
CHARACTER ResourceFromUrl (character) Extracts the Resource portion from an http or https URL
LOGICAL ValidateEmailAddress (character) Validates an Email Address by splitting it into Domain and Local Part.
LOGICAL ValidateEmailAddress (character, logical) Validates an Email Address by splitting it into Domain and Local Part.
LOGICAL VerifyMXRecord (character) Verifies the Domain by checking the existance of the MX record

Top Constructor Summary
Options Name Purpose
NetworkHelper () Disallow instance creation


Method Detail
Top

DownloadFile (character, character)

Purpose: Downloads a file from a specified web address to a given file
Notes: Currently supported on Windows only

Parameters:
pcFileAddress CHARACTER
The address (URL) to download from
pcTargetFile CHARACTER
The file name (and path) to download to
Top

LONGCHAR DownloadString (character)

Purpose: Downloads a string from a specified web address to a given file
Notes: Currently supported on Windows only

Parameters:
pcFileAddress CHARACTER
The address (URL) to download from
Returns LONGCHAR
A LONGCHAR value with the data from the URL
Top

LONGCHAR DownloadString (character, HttpStatus)

Purpose: Downloads a string from a specified web address to a given file
Notes: Currently supported on Windows only, not supported on OpenEdge 10.2B
due to .NET 4.0 dependency

Parameters:
pcFileAddress CHARACTER
The address (URL) to download from
poStatus Consultingwerk.Util.HttpStatus
The HttpStatus instance with the http status code and description of the request
Returns LONGCHAR
A LONGCHAR value with the data from the URL
Top

LOGICAL EmailCheckDomainLabel (character)

Purpose: Validates a single label of a domain name
Notes: SCL-5948: A domain label consists of the letters A-Z and a-z,
the digits 0-9 and the hyphen only and must neither start nor
end with a hyphen. The local part character set of
EmailCheckDotAtom is far wider and contains shell
metacharacters

Parameters:
pcLabel CHARACTER
The domain label (the text between two dots) to verify
Returns LOGICAL
Returns TRUE if the validation was successful
Top

LOGICAL EmailCheckDomainName (character)

Purpose: Validates that every label of a domain name consists of valid
characters only
Notes: SCL-5948: Also used as the guard of VerifyMXRecord, so that
nothing but a well-formed host name is ever passed to the
lookup command

Parameters:
pcDomain CHARACTER
The domain name to verify
Returns LOGICAL
Returns TRUE if the validation was successful
Top

LOGICAL EmailCheckDotAtom (character)

Purpose: Validates that a DotAtom of an EmailAddress consists of valid
characters only.
Notes: Normals charset (always allowed):
A-Za-z0-9.!#$%&'*+-/=?^_`{|}~
Extended charset (only when enclosed by double quotes):
"(),:[>@[\] [>@[\] plus space
SCL-5948: Used for the atoms of the local part only, the labels
of the domain are verified by EmailCheckDomainLabel

Parameters:
pcAtom CHARACTER
Dot Atom of the email address to be verified
Returns LOGICAL
Returns TRUE if the validation was successful
Top

LOGICAL EmailSplitParts (character, character, character)

Purpose: Splits an EmailAddress into Local Part and Domain
Notes: Checks if there is at least one @ sign and splits at the last
occurrence of the @ sign as they are allowed inside quotes in
the Local Part.

Parameters:
pcEmailAddress CHARACTER
Full EmailAddress to be verified
pcLocalPart CHARACTER
Local part of the email address (everything before @domain.xyz)
pcDomain CHARACTER
Domain part of the email address (everything after the last @)
Returns LOGICAL
Returns TRUE if the structure validation was successful
Top

LOGICAL EmailVerifyDomain (character, logical)

Purpose: Verifies a Domain Name on character base and if wanted
by checking the domains MX record
Notes:

Parameters:
pcDomain CHARACTER
Domain part of the email address (everything after the last @)
plVerifyMX LOGICAL
Optional verify the MX for the given Domain
Returns LOGICAL
Returns TRUE if the validation was successful
Top

LOGICAL EmailVerifyLocalPart (character)

Purpose: Verifies a LocalPart on character base
Notes: SCL-5948: The local part is split into atoms at the dots outside
of double quotes, so a quoted string that contains a dot is
verified as a single atom. Empty atoms (a leading, trailing or
double dot) are rejected

Parameters:
pcLocalPart CHARACTER
Local part of the email address (everything before @domain.xyz)
Returns LOGICAL
Returns TRUE if the validation was successful
Top

CHARACTER HostFromUrl (character)

Purpose: Extracts the Host portion from an URL
Notes: SCL-5948: User info (user:password@) is removed from the host.
For an IPv6 literal (http://[::1]:8080/) the address without the
enclosing square brackets is returned (::1)

Parameters:
pcUrl CHARACTER
The URL that contains the host
Returns CHARACTER
The hostname
Top

CHARACTER ResourceFromUrl (character)

Purpose: Extracts the Resource portion from an http or https URL
Notes: SCL-5948: A slash inside the query string of a URL without a
path does not start the path (http://host?redirect=/home returns
/?redirect=/home)

Parameters:
pcUrl CHARACTER
The URL that contains the resource
Returns CHARACTER
The resource name
Top

LOGICAL ValidateEmailAddress (character)

Purpose: Validates an Email Address by splitting it into Domain and Local Part.
Notes:

Parameters:
pcEmailAddress CHARACTER
Full EmailAddress to be verified
Returns LOGICAL
Returns TRUE if the validation was successful
Top

LOGICAL ValidateEmailAddress (character, logical)

Purpose: Validates an Email Address by splitting it into Domain and Local Part.
Notes: SCL-5948: The local part is verified before the domain, so the
(optional) MX lookup only runs for an otherwise valid address

Parameters:
pcEmailAddress CHARACTER
Full EmailAddress to be verified
plVerifyMX LOGICAL
Optional verify the MX for the given Domain
Returns LOGICAL
Returns TRUE if the validation was successful
Top

LOGICAL VerifyMXRecord (character)

Purpose: Verifies the Domain by checking the existance of the MX record
Notes: Needs different logic for Windows and Unix
SCL-5948: Returns FALSE without any lookup when the domain is not
a well-formed host name (labels of letters, digits and hyphen).
On Unix the domain is passed to dig as a single, quoted argument

Parameters:
pcDomain CHARACTER
Domain string to lookup as an MX
Returns LOGICAL
Returns TRUE if the MX lookup was successful


Constructor Detail
Top

NetworkHelper ()

Purpose: Disallow instance creation
Notes:



©2006-2026 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       10.10.2026 15:35:49