DynuCOM Version 3.0 - Main

Dynu components are small programs designed to facilitate advanced functions to ASP (Active Server Pages), Visual Basic and Visual C++ programmers. Installation of Dynu components allow usage from ASP, Visual Basic as well as Visual C++ applications. They provide features that will expand your web site or application in ways not possible otherwise.

DynuCOM component has all of the below functionalities:
  • FTP - Perform uploads, downloads, directory listings and even execute any commands on FTP server.
  • Pop3 - Check and retrieve Pop3 mail on your website.
  • Upload - Enable uploading of files on your website.
  • Encrypt - Encrypt and decrypt secure data all from within your ASP pages.
  • Socket - Enables easy implementation of socket based communication from your ASP pages.
  • Whois - Retrieve registrant information and check availibility of domain name using any whois server on the internet.
  • Ping - Ping hosts and ip with options for number of echo requests, byte size and timeout.
  • Email - Email multiple recipients, CC, BCC.
  • DNS - Perform DNS lookups, reverse lookup, get local ip and host name, check ip address validity and ping hosts.
  • HTTP - Retrieve documents and response headers using HTTP Get and Post with SSL, Proxy and Authentication support.
  • File - Complete and powerful file manipulation component.
  • Exec - Execute any DOS/Win command and get back result as a string.
  • String - Complete and advanced string processing.
  • Wait - Waits for x seconds without using any system resources.
  • DateTime - Date and time formating, elapsed time, GMT date and time, wait, and more.
  • CreditCard - Validate checksum, type and expiration date of credit cards.
DynuCOM has been tested to be 100% compatible with IIS 4.0/5.0/6.0, Personal Web Server(PWS) running on all versions of Windows 9x/NT/2000. DynuCOM has been built using Microsoft Visual C++ for fast, highly scalable and efficient multithreaded performance. Please click on each functionality to view its details. You can download a free trial version of this component which will expire one month after installation on the server. If you have any trouble installing or using this component please feel free to contact our Technical Support Staff at support@dynu.com.

Copyright © 1997-2002 Dynu Systems, Inc. All rights reserved.


DynuCOM Version 3.0 - DynuCreditCard Methods and Properties

DynuCreditCard Methods and Properties

Dynu.CreditCard
Checkcard(CardNumber, CardType, Month, Year)

- Method [image] - Property

Methods
Checkcard(CardNumber - String, CardType - String, Month - Integer, Year - Integer)
Checks to see if card is valid based on number, type and expiration month and year and returns the result as a boolean.
Return value:
TRUE - Valid credit card.
FALSE - Invalid credit card.

CardNumber - Cardnumber to be verified as a string. The value passed may contain spaces, quotes, forwardslash etc as all characters other than numbers will be removed automatically before credit card verification.
CardNumber - Cardtype as a character. The following one character abbreviations may be used for card type:
V - Visa
M - Mastercard
D - Discover
A - Amex
In addition "J", "C" and "E" card types can also be used for validation.
Month - Two digit month which is part of expiration date. This parameter must be a two digit integer such as 01, 02 etc.
Year - Four digit year which is part of expiration date. Please note that year must be 4 digits such as 2001, 2003 etc.

If (oCC.CheckCard("5329053144000902","M", 10, 2001)=1) Then
Response.Write("Valid Credit Card")
Else
Response.Write("Invalid Credit Card")
End If


DynuCOM Version 3.0 - DynuDateTime Methods and Properties

DynuDateTime Methods and Properties

Dynu.DateTime
Format(Format - String)
FormatGmt(Format - string)
GetDay()
GetDayOfWeek()
GetHour()
GetMinute()
GetSecond()
GetYear()
Wait(Seconds - Integer)
StartClock()
StopClock()
ElapsedTime(Format - String)
ElapsedDays()
ElapsedHours()
ElapsedMinutes()
ElapsedSeconds()
ElapsedTotalHours()
ElapsedTotalMinutes()
ElapsedTotalSeconds()

- Method [image] - Property

Methods
Format(Format - String)
Constructs a string representing the current time.
Return value:
STRING - Custom formatted current date/time as a string.

Format - Format string containing format codes as well as literal characters. The literal characters, such as "DATE:" amd the commas in this example are added to the output exactly as you type them, whereas the format codes are replaced with the appropriate values.

Response.Write oDateTime.Format("Date: %A, %B %d, %Y")
Output similar to: Saturday, April 20, 2001
FormatGMT(Format - String)
Constructs a string representing the current Greenwich Mean Time.
Return value:
STRING - Custom formatted current GMT date/time as a string.

Format - Format string containing format codes as well as literal characters. The literal characters, such as "DATE:" amd the commas in this example are added to the output exactly as you type them, whereas the format codes are replaced with the appropriate values.

Response.Write oDateTime.FormatGMT("Date: %A, %B %d, %Y")
Output similar to: Saturday, April 20, 2001
GetDay()
Gets the current day of the month as an integer.
Return value:
INTEGER - Returns the day of the month, based on local time, in the range 1 through 31 as a integer.

Response.Write oDateTime.GetDay()
Output similar to: 16
GetDayOfWeek()
Gets the current day of the week as an integer.
Return value:
INTEGER - Returns the day of the week based on local time; 1 = Sunday, 2 = Monday, ..., 7 = Saturday.

Response.Write oDateTime.GetDayOfWeek()
Output similar to: 3
GetHour()
Gets the current local hour as an integer.
Return value:
INTEGER - Returns the hour, based on local time, in the range 0 through 23 as a integer.

Response.Write oDateTime.GetHour()
Output similar to: 21
GetMinute()
Gets the current local minute as an integer.
Return value:
INTEGER - Returns the minute, based on local time, in the range 0 through 59 as a integer.

Response.Write oDateTime.GetMinute()
Output similar to: 46
GetSecond()
Gets the current local second as an integer.
Return value:
INTEGER - Returns the second, based on local time, in the range 0 through 59 as a integer.

Response.Write oDateTime.GetSecond()
Output similar to: 32
GetYear()
Returns the year, based on local time, in the range January 1,1970 to January 18, 2038 (inclusive) as an integer.
Return value:
INTEGER - Returns the year, based on local time, in the range January 1,1970 to January 18, 2038 (inclusive) as a integer.

Response.Write oDateTime.GetYear()
Output similar to: 2001
Wait(Seconds - Integer)
Suspends execution of application withour consuming any system resources for a specific period of time in seconds.

Seconds - Seconds to wait for as an integer.

oDateTime.Wait(10)
StartClock()
Starts the stop watch.

oDateTime.StartClock()
StopClock()
Stops the stop watch.

oDateTime.StopClock()
ElapsedTime(Format - String)
Constructs a string representing the time elapsed between StartClock() and StopClock() methods.

Format - Format string containing format codes as well as literal characters. The literal characters, such as "DATE:" amd the commas in this example are added to the output exactly as you type them, whereas the format codes are replaced with the appropriate values.

oDateTime.ElapsedTime("Elapsed Time: %D Days, %H Hours, %M Minutes, %S Seconds")
ElapsedDays()
Gets the elapsed days as an integer.
Return value:
INTEGER - Returns the elapsed days as a integer. StartClock() and StopClock() methods must be used before this method is called.

oDateTime.StartClock()
oDateTime.Wait(300)
oDateTime.StopClock()
Response.Write oDateTime.ElapsedDays()
Output similar to: 0
ElapsedHours()
Gets the elapsed hours as an integer.
Return value:
INTEGER - Returns the elapsed hours as a integer. StartClock() and StopClock() methods must be used before this method is called.

oDateTime.StartClock()
oDateTime.Wait(300)
oDateTime.StopClock()
Response.Write oDateTime.ElapsedHours()
Output similar to: 0
ElapsedMinutes()
Gets the elapsed minutes as an integer.
Return value:
INTEGER - Returns the elapsed minutes as a integer. StartClock() and StopClock() methods must be used before this method is called.

oDateTime.StartClock()
oDateTime.Wait(300)
oDateTime.StopClock()
Response.Write oDateTime.ElapsedMinutes()
Output similar to: 5
ElapsedSeconds()
Gets the elapsed seconds as an integer.
Return value:
INTEGER - Returns the elapsed seconds as a integer. StartClock() and StopClock() methods must be used before this method is called.

oDateTime.StartClock()
oDateTime.Wait(300)
oDateTime.StopClock()
Response.Write oDateTime.ElapsedSeconds()
Output similar to: 0

ElapsedTotalHours()
ElapsedTotalHours()
Gets the total elapsed hours as an integer.
Return value:
INTEGER - Returns total hours elapsed between StartClock() and StopClock() methods as a integer.

oDateTime.StartClock()
oDateTime.Wait(300)
oDateTime.StopClock()
Response.Write oDateTime.ElapsedTotalHours()
Output similar to: 0
ElapsedTotalMinutes()
Gets the total elapsed minutes as an integer.
Return value:
INTEGER - Returns total minutes elapsed between StartClock() and StopClock() methods as a integer.

oDateTime.StartClock()
oDateTime.Wait(300)
oDateTime.StopClock()
Response.Write oDateTime.ElapsedTotalMinutes()
Output similar to: 5
ElapsedTotalSeconds()
Gets the total elapsed seconds as an integer.
Return value:
INTEGER - Returns total seconds elapsed between StartClock() and StopClock() methods as a integer.

oDateTime.StartClock()
oDateTime.Wait(300)
oDateTime.StopClock()
Response.Write oDateTime.ElapsedTotalSeconds()
Output similar to: 300

Format Codes
Code | Description
%a | Day name, abbreviated (such as Sat for Saturday).
%A | Day name, no abbreviation.
%b | Month name, abbreviated (such as Mar for March).
%B | Month name, no abbreviation.
%c | Localized date and time (for the U.S., that would be something like 03/17/99 12:15:34
%d | Day of the month as a number (01-31).
%H | Hour in the 24-hour format (00-23).
%I | Hour in the normal 12-hour format (01-12).
%j | Day of the year as a number (001-366).
%m | Month as a number (01-12).
%M | Minute as a number (00-59).
%p | Localized A.M. /P.M. indicator for 12-hour clock.
%S | Second as a number (00-59).
%U | Week of the year as a number (00-51, considering Sunday to be the first day of the week).
%w | Day of the week as a number (0-6, with Sunday being 0).
%W | Week of the year as a number (00-51, considering Monday to be the first day of the week).
%x | Localized date representation.
%X | Localized time representation.
%y | Year without the century prefix as a number (00-99).
%Y | Year with the century prefix as a decimal number (such as 199).
%z | Name of time zone, abbreviated.
%Z | Name of time zone, no abbreviation.
%% | Percent sign.


DynuCOM Version 3.0 - DynuDNS Methods and Properties

DynuDNS Methods and Properties

Dynu.DNS
Lookup(Host - String)
ReverseLookup(IP - String)
GetLocalIP()
GetLocalHost()
IsIPValid(IP - String)
Ping(Host - String)

- Method [image] - Property

Methods
Lookup(Host - String)
Finds the IP Address of the hostname.
Return value:
STRING - IP Address of the hostname as a string.

Host - Hostname whois IP Address is to be retrieved as a string.

Response.Write oDNS.Lookup("microsoft.com")
ReverseLookup(IP Address - String)
Finds the hostname of the IP Address passed in as a parameter.
Return value:
STRING - Hostname of the IP Address as a string.

IP Address - IP Address passed as a string.

Response.Write oDNS.ReverseLookup("198.144.10.35")
GetLocalIP()
Returns the local IP of the server as a string.
Return value:
STRING - IP Address of the server.

Response.Write oDNS.GetLocalIP()
GetLocalHost()
Returns the local hostname of the server as a string.
Return value:
STRING - Hostname of the server.

Response.Write oDNS.GetLocalHost()
IsIPValid(IP - String)
Checks validity of an IP Address.
Return value:
TRUE - IP Address is valid.
FALSE - IP Address is invalid.

IP - IP Address whois validity is to be check passed as a string.

If oDNS.IsIPValid("198.144.10.35") Then
Response.Write "IP Address 198.144.10.35 is invalid."
Else
Response.Write "IP Address 198.144.10.35 is valid."
End If
Ping(Host - String)
Pings the given host and returns the result as a string.
Return value:
STRING - Response of the ping as a string.

Hostname - Hostname to be pinged passed as a string.

Response.Write oDNS.Ping("dynu.com")


DynuCOM Version 3.0 - DynuStringUtil Methods and Properties

DynuStringUtil Methods and Properties

Dynu.StringUtil
Compare(Str1- String, Str2 - String)
CompareNoCase(Str1- String, Str2 - String)
Empty(Str - String)
Find(Str - String, Ch - String, Pos - Integer)
Combine(Str1 - String, Str2 - String)
Delete(Str - String, Pos - Integer, Count - Integer)
FindOneOf(Str - String, Ch - String)
GetAt(Str - String, Pos - Integer)
GetLength(Str - String)
Insert(Str - String, Pos - Interger, Ch - String)
IsEmpty(Str - String)
Left(Str - String, Count - Integer)
MakeLower(Str - String)
MakeReverse(Str - String)
MakeUpper(Str - String)
MakeProper(Str - String)
Mid(Str - String, Startpos - Integer, Count - Integer)
Remove(Str - String, Ch - String)
ReverseFind(Str - string, Ch - Character)
Right(Str - String, Count - Integer)
SetAt(Str - String, Ch - Character, Pos - Integer)
SpanExcluding(Str - String, Set - String)
SpanIncluding(Str - String, Set - String)
TrimLeft(Str - String, Ch - String)
TrimRight(Str - String, Ch - String)
Replace(Str - String, NewStr - String, OldStr - String)

- Method [image] - Property

Methods
Compare(Str1- String, Str2 - String)
Case-sensitive comparison of two strings.

Return value:
0 - 0 is returned when strings Str1 and Str2 are identical.
>0 - positive integer is returned when Str1 is greater than Str2.
<0 - negative integer is returned when Str1 is less than Str2.

Str1 - First string used for comparison as a string.
Str2 - Second string used for comparison as a string.

Response.Write oStringUtil.Compare("abc", "abd")
Output: -1
CompareNoCase(Str1- String, Str2 - String)
Case-insensitive comparison of two strings.

Return value:
0 - 0 is returned when strings Str1 and Str2 are identical.
>0 - positive integer is returned when Str1 is greater than Str2.
<0 - negative integer is returned when Str1 is less than Str2.

Str1 - First string used for comparison as a string.
Str2 - Second string used for comparison as a string.

Response.Write oStringUtil.CompareNoCase("aBc", "AbD")
Output: -1
Empty(Str - String)
Clears a string or makes it empty.

Return value:
STRING - An empty string.

Str - String to be cleared or emptied as a string.

strTemp = oStringUtil.Empty(strTemp)
Find(Str - String, Ch - String, Pos - Integer)
Locates a substring Ch within the larger string Str starting the search from zero based position Pos.

Return value:
INTEGER - Zero based location of substring with primary string if found. -1 if substring is not found.

Str - Primary String to look for substring in as a string.
Ch - Substring to search for in primary string as a string.
Pos - Zero based position to start the search as an integer.

Response.Write oStringUtil.Find("This is an example.", "an", 3)
Output: 8
Combine(Str1 - String, Str2 - String)
Concatenates or adds strings Str1 and Str2 into a larger string.

Return value:
STRING - Resultant concatenated string.

Str1 - First string which is begining part of final returned string as a string.
Str2 - Second or later part of final returned string as a string.

Response.Write oStringUtil.Combine("This is an", " example.")
Output: This is an example.
Delete(Str - String, Pos - Integer, Count - Integer)
Deletes a character or characters from a string.

Return value:
STRING - Resultant modified string.

Str - Primary string which is to be manipulated as a string.
Pos - Zero based position from which to start deleting characters as an integer.
Count - Number of characters to be deleted as an integer.

Response.Write oStringUtil.Delete("This is an example.", 5, 3)
Output: This an example.
FindOneOf(Str - String, Ch - String)
Searches the string to find the first character that matches any character in the character set.

Return value:
INTEGER - Zero-based index of the first character in Str string that is also in Ch. –1 if there is no match.

Str - Primary string in which to find one of the characters as a string.
Ch - Character set to find in primary string as a string.

Response.Write oStringUtil.FindOneOf("abcdef", "xd")
Output: 3
GetAt(Str - String, Pos - Integer)
Returns the character at a given position.

Return value:
CHARACTER - One character returned as a string.

Str - Primary string from which to retrieve the character as a string.
Pos - Zero based position of character to retrieve.

Response.Write oStringUtil.GetAt("abcdef", 3)
Output: d
GetLength(Str - String)
Returns the number of characters in a Str string. For multibyte characters, counts each 8-bit character; that is, a lead and trail byte in one multibyte character are counted as two characters.

Return value:
INTEGER - Length of string.

Str - Primary string whose length is to be returned as a string.

Response.Write oStringUtil.GetLength("abcdef")
Output: 6
Insert(Str - String, Pos - Interger, Ch - String)
Inserts a single character or a substring at the given index within the string.

Return value:
STRING - Final string with new substring inserted.

Str - Primary string in which to insert substring as a string.
Pos - Zero based position to insert the character at as an integer.
Ch - Substring to insert into primary string as a string.

Response.Write oStringUtil.Insert("abcdef", 3, "xyz")
Output: abcdxyzef
IsEmpty(Str - String)
Tests whether a string Str contains no characters.

Return value:
TRUE - String Str is empty or contains no characters.
FALSE - String Str is not empty or contains characters.

Str - Primart string which is checked for containment of characters as a string.

strTemp = "abcd"
If oStringUtil.IsEmpty(strTemp) Then
Response.Write "String is empty."
Else
Response.Write "String is not empty."
End If

Left(Str - String, Count - Integer)
Extracts the left part of a string.

Return value:
STRING - Extracted characters.

Str - Primary string from which to extract characters as a string.
Count - Number of characters to extract as an integer.

Response.Write oStringUtil.Left("abcdef", 3)
Output: abc
MakeLower(Str - String)
Converts all the characters in this string to lowercase characters.

Return value:
STRING - Original string in lowercase format.

Str - Primary string to turn into lower case as a string.

Response.Write oStringUtil.MakeLower("aBcDeF")
Output: abcdef
MakeReverse(Str - String)
Reverses the characters in this string.

Return value:
STRING - String which has reversed order of characters.

Str - Primary string whose characters is to be reversed as a string.

Response.Write oStringUtil.MakeReverse("abcdef")
Output: fedcba
MakeUpper(Str - String)
Converts all the characters in this string to uppercase characters.

Return value:
STRING - Original string in uppercase format.

Str - Primary string to turn into upper case as a string.

Response.Write oStringUtil.MakeUpper("aBcDeF")
Output: ABCDEF
MakeProper(Str - String)
Converts the string to display the first letter of all words in uppercase format.

Return value:
STRING - Original string in proper case format.

Str - Primary string to turn into proper case as a string.

Response.Write oStringUtil.MakeProper("this is an example.")
Output: This Is An Example.
Mid(Str - String, Startpos - Integer, Count - Integer)
Extracts the middle part of a string.

Return value:
STRING - Extracted string.

Str - Primary string to extract substring from as a string.
StartPos - Zero based starting position to extract substring from as an integer.
Count - Number of characters to extract as an integer.

Response.Write oStringUtil.Mid("This is an example.", 11, 7)
Output: example
Remove(Str - String, Ch - String)
Removes indicated characters from a string.

Return value:
STRING - Resultant string without indicated characters.

Str - Primary string to remove indicated characters from as a string.
Ch - Character set containing characters to remove from primary string.

Response.Write oStringUtil.Remove("This is an example.", "ae")
Output: This is n xmpl.
ReverseFind(Str - string, Ch - Character)
Finds a character inside a larger string; starts from the end.

Return value:
INTEGER - The index of last character that matches the requested character. -1 if the character is not found.

Str - Primary string to look for indicated character in as a string.
Ch - One character to find in primary string.

Response.Write oStringUtil.ReverseFind("This is an example.", "x")
Output: 12
Right(Str - String, Count - Integer)
Extracts the right part of a string.

Return value:
STRING - The extracted string.

Str - Primary string to extract from in as a string.
Count - Number of characters to extract.

Response.Write oStringUtil.Right("This is an example.", 5)
Output: mple.
SetAt(Str - String, Ch - Character, Pos - Integer)
Sets a character at a given position.

Return value:
STRING - Resultant string with inserted character.

Str - Primary string to insert character into as a string.
Ch - Character to insert as a string. Only one character should be passed in.
Pos - Zero based position to insert the character at as an integer.

Response.Write oStringUtil.SetAt("This is a example.", "n", 9)
Output: This is an example.
SpanExcluding(Str - String, Set - String)
Extracts a substring that contains only the characters not in a set.

Return value:
STRING - Substring which contain characters not in string Set.

Str - Primary string to extract substring from as a string.
Set - Set of characters to not extract from primary string as a string.

Response.Write oStringUtil.SpanExcluding("This is a example.", "ae")
Output: This is n xmpl.
SpanIncluding(Str - String, Set - String)
Extracts a substring that contains only the characters in a set.

Return value:
STRING - Substring which contain characters in string Set.

Str - Primary string to extract substring from as a string.
Set - Set of characters to extract from primary string as a string.

Response.Write oStringUtil.SpanIncluding("This is a example.", "ae")
Output: aeae
TrimLeft(Str - String, Ch - String)
Trim leading characters from the string.

Return value:
STRING - Primary string without leading characters in character set Ch.

Str - Primary string to extract substring from as a string.
Ch - Set of characters to clear from primary string as a string.

Response.Write oStringUtil.SpanIncluding("aeeeaeaoadf", "ae")
Output: oadf
TrimRight(Str - String, Ch - String)
Trim trailing characters from the string.

Return value:
STRING - Primary string without trailing characters in character set Ch.

Str - Primary string to extract substring from as a string.
Ch - Set of characters to clear from primary string as a string.

Response.Write oStringUtil.TrimRight("aeeeaeaoadfsaeadaeae", "ae")
Output: aeeeaeaoadfsaead
Replace(Str - String, OldStr - String, NewStr - String)
Replace occurence of old phrase with new phrase in the given string.

Return value:
STRING - New string with old phrase replaced by new one.

Str - Primary string to perform the replace function on.
OldStr - The old phrase which needs to be replaced by the new phrase.
NewStr - The new phrase which will replace the old phrase.

Response.Write oStringUtil.Replace("cats are very cute pets. I love cats.", "cats", "dogs")
Output: dogs are very cute pets. I love dogs.


DynuCOM Version 3.0 - DynuExec Methods and Properties

DynuExec Methods and Properties

Dynu.Exec
Execute(Command - String)

- Method [image] - Property

Methods
Execute(Command)
Executes a command and returns the result as a string.
Return value:
STRING - Result of the command as a string.

Command - DOS/Windows command line with included parameters as a string.

strResult = oExec.Execute("nslookup -type=mx yahoo.com")


DynuCOM Version 3.0 - DynuEmail Methods and Properties

DynuEmail Methods and Properties

Dynu.Email
Body as String
Subject as String
From as String
FromName as String
Host as String
Port as Integer
IncludeErrorCode as Boolean
IsHTML as Boolean
Send()
AddAddress(Address - String, [Name - String])
AddCc(Address - String, [Name - String])
AddBcc(Address - String, [Name - String])
AddAttachment(Path - String)
AddReplyTo(Address - String, [Name - String])
SetPriority(Priority - Integer)
Reset()

- Method [image] - Property

Methods

Body as String
Body of the email message as a string.

oEmail.Body = "Dear Tom," & vbcrlf & vbcrlf & "How are you doing?" & vbcrlf & vbcrlf & "-Mike"
Subject as String
Subject of the email message as a string.

oEmail.Subject = "Test Email"
From as String
From email address as a string.

oEmail.From = "mike@dynu.com"
FromName as String
From name as a string.

oEmail.FromName = "Mike Johnson"
Host as String
Hostname of SMTP server via which this email must be sent as a string. This is a mandatory field. A valid SMTP server is required to relay email messages.

oEmail.Host = "smtp.dynu.com"
Port as an Integer
Port of SMTP server via which this email must be sent as a string. The default value used is 25.

oEmail.Port = 1033
IncludeErrorCode as Boolean
Flag to include error code or not in case of error as a boolean. Set to TRUE by default.

oEmail.IncludeErrorCode = TRUE
IsHTML as Boolean
Flag to specifying if the body of email is HTML as a boolean. Set to FALSE by default.

oEmail.IsHTML = TRUE
Send()
Sends the email message via the SMTP server.
Return value:
TRUE - Email message sent successfully.
FALSE - Email message could not be sent.

If oEmail.Send() Then
Response.Write "Email sent successfully!"
Else
Response.Write "Error: Email could not be sent."
End If
AddAddress(Address - String, [Name - String])
Add a 'To' email address to which email should be sent. Use this method multiple times to add more recepients.

Address - Email address of recepient as a string.
Name - Name of recepient as a string. This parameter is optional.

oEmail.AddAddress "becky@dynu.com"
oEmail.AddAddress "janice@dynu.com", "Janice Born"
AddCc(Address - String, [Name - String])
Add a 'Cc' email address to which email should be sent. Use this method multiple times to add more Cc recepients.

Address - Email address of Cc recepient as a string.
Name - Name of Cc recepient as a string. This parameter is optional.

oEmail.AddCc "carmen@dynu.com"
oEmail.AddCc "jackie@dynu.com"
oEmail.AddCc "tim@dynu.com", "Tim Squires"
AddBcc(Address - String, [Name - String])
Add a 'Bcc' email address to which email should be sent. Use this method multiple times to add more Cc recepients.

Address - Email address of Bcc recepient as a string.
Name - Name of Bcc recepient as a string. This parameter is optional.

oEmail.AddBcc "chris@dynu.com"
oEmail.AddBcc "eric@dynu.com", "Eric Murray"
oEmail.AddBcc "trent@dynu.com"

AddAttachment(Path - String)
Adds an attachment to the email. Use this method multiple times to add multiple attachments.

Path - Fully qualified path of attachment as a string. Do not to use paths on shared drive unless the username under which the application runs has permissions to the drive.

oEmail.AddAttachment "c:\test.txt"

AddReplyTo(Address - String, [Name - String])
Specify the 'ReplyTo' email address.

Address - Email address of sender as a string.
Name - Name of sender as a string. This parameter is optional.

oEmail.ReplyTo "richard@dynu.com", "Richard Thompson"

SetPriority(Priority - Integer)
Sets the priority of the email message.

Priority - An integer of value between 1 and 5. 1 is highest priority and 5 is lowest priority. By default, this is set to 3(normal).

oEmail.SetPriority 1

Reset()
Resets all internal parameters such as To addresses, Cc addresses, Bcc addresses, ReplyTo, Body, Subject, Attachment paths, Host and Port. Default values are loaded at this time.

oEmail.Reset


DynuCOM Version 3.0 - DynuEncrypt Methods and Properties

DynuEncrypt Methods and Properties

Dynu.Encrypt
Encrypt(String - String, Password - String)
Decrypt(String - String, Password - String)

- Method [image] - Property

Methods
Encrypt(String - String, Password - String)
Encrypt the data and lock it using password provided. Please note that the same pair of String/Password will result in a different encrypted value due to three way encryption.
Return value:
STRING - Encrypted data which can be decrypted using Decrypt method and password.

String - Data to be encrypted passed in as a string. All data including credit card numbers etc must be passed in as string.
Password - Password to be used to double up security of the encryption. This field may be left empty however the encrypted data may be decrypted by anyone who has access to this component.

sEncryptedData = oEncrypt.Encrypt("This is some data", "somepassword")
Response.Write sEncryptedData
Decrypt(String - String, Password - String)
Decrypt the data using password provided and return the original string.
Return value:
STRING - Decrypted original data as a string.

String - Encrypted data which needs to be decrypted passed in as a string.
Password - Password to be used to unlock the encryption. Please note that loss of password results in permanent loss of original data as it cannot be decrypted.

Response.Write oEncrypt.Decrypt(sEncryptedData, "somepassword")


DynuCOM Version 3.0 - DynuFileUtil Methods and Properties

DynuFileUtil Methods and Properties

Dynu.FileUtil
Open(Filename - String, [Openmode - String], [Readwritemode - String], [Sharemode - String])
Close()
Read(Bytes - Integer)
Write(String - String)
GetLength()
SetLength(Length - Integer)
GetFileName()
GetFilePath()
GetFileTitle()
GetPosition()
Seek(Bytes - Integer, [Movementmode - String])
SeekToBegin()
SeekToEnd()
GetAccessedTime(Filename - String)
GetCreatedTime(Filename - String)
GetModifiedTime(Filename - String)
GetAttributes(Filename - String)
GetSize(Filename - String)
Remove(Filename - String)
Rename(Oldfilename - String, Newfilename - String)
SetAccessedTime(Filename - String, Year - Integer, Month - Integer, Day - Integer,
Hour - Integer, Min - Integer, Sec - Integer, dst - Integer)
SetCreatedTime(Filename - String, Year - Integer, Month - Integer, Day - Integer,
Hour - Integer, Min - Integer, Sec - Integer, dst - Integer)
SetModifiedTime(Filename - String, Year - Integer, Month - Integer, Day - Integer,
Hour - Integer, Min - Integer, Sec - Integer, dst - Integer)
SetSize(Filename - String, Size - Integer)
SetAttributes(Filename - String, Attributes - String)

- Method [image] - Property

Methods
Open(Filename - String, [Openmode - String], [Readwritemode - String], [Sharemode - String])
Opens a file.

Return value:
TRUE - File opened successfully.
FALSE - File could not be opened.

Filename - Name of the file including path as a string.
Openmode - This parameter must be set to 'modecreate' if existing file must be truncated. This parameter is optional and the default value is 'modenotruncate'.
Readwritemode - There are three ReadWrite modes. This parameter is optional and the default value is 'readwrite'.
'read' - will open the file in readonly mode
'write' - will open the file in writeonly mode
'readwrite' - will open the file in read and write mode.
Sharemode - There are four Share modes. The default value is 'sharedenynone'.
'shareexclusive' - will open the file with exclusive share mode and will deny access of this file to any other process. This mode will fail if the file is being used by another process.
'sharedenyread' - will open the file and will deny read access to any other process.
'sharedenywrite' - will open the file and will deny write access to any other process.
'sharedenynone' - will open the file and will not deny access to any other process.

If oFileUtil.Open("c:\autoexec.bat") Then
Response.Write "Autoexec.bat file opened."
Else
Response.Write "Autoexec.bat file could not be opened."
End If
Close()
Closes an open file.

Return value:
None

oFileUtil.Close
Read(Bytes - Integer)
Reads data from an open file.

Return value:
STRING - Data read from the file as a string.

Bytes - Number of bytes to be read from the file.

If oFileUtil.Open("C:\autoexec.bat") Then
sData = oFileUtil.Read(10)
Response.Write sData
Else
Response.Write "autoexec.bat file could not be opened."
End If
Write(String - String)
Writes data to the open file.

Return value:
None

String - Data to be written to the file as a string.

If oFileUtil.Open("C:\autoexec.bat") Then
oFileUtil.SeekToEnd()
oFileUtil.Write("REM Test")
Response.Write "Data written to autoexec.bat file"
Else
Response.Write "autoexec.bat file could not be opened."
End If
GetLength()
Returns the length or size of the file.

Return value:
INTEGER - length of file as an integer

If oFileUtil.Open("C:\autoexec.bat") Then
Response.Write "autoexec.bat file size is: " & oFileUtil.GetLength()
Else
Response.Write "autoexec.bat file could not be opened."
End If
SetLength(Length - Integer)
Sets the length or size of the file.

Return value:
None

If oFileUtil.Open("C:\autoexec.bat") Then
oFileUtil.SetLength(10)
Else
Response.Write "autoexec.bat file could not be opened."
End If
GetFileName()
Returns the name of the file without the full path.

Return value:
STRING - Name of the file excluding the path.

If oFileUtil.Open("C:\autoexec.bat") Then
Response.Write "Filename: " & oFileUtil.GetFileName()
Else
Response.Write "autoexec.bat file could not be opened."
End If
GetFilePath()
Returns the path of the file without the file name.

Return value:
STRING - Path of the file excluding the name of the file.

If oFileUtil.Open("C:\autoexec.bat") Then
Response.Write "Path: " & oFileUtil.GetFilePath()
Else
Response.Write "autoexec.bat file could not be opened."
End If
GetFileTitle()
Returns the title of the file. This is an attribute of the file and not data contained within the file.

Return value:
STRING - Title of the file as a string.

If oFileUtil.Open("C:\autoexec.bat") Then
Response.Write "Title: " & oFileUtil.GetFileTitle()
Else
Response.Write "autoexec.bat file could not be opened."
End If
GetPosition()
Returns the zero based index of the read/write cursor within the file. This is 0 when a file is opened.

Return value:
INTEGER - Position of read/write cursor as an integer.

If oFileUtil.Open("C:\autoexec.bat") Then
oFileUtil.SeekToEnd()
Response.Write "Position: " & oFileUtil.GetPosition()
Else
Response.Write "autoexec.bat file could not be opened."
End If
Seek(Bytes - Integer, [Movementmode - String])
Moves the zero based index of the read/write cursor within the file. Please use methods SeekToEnd() and SeekToBegin() to go to the last and first cursor position respectively.

Return value:
None

Bytes - Number of bytes the read/write cursor must be moved within the file.
Movementmode - There are three movement modes. This parameter is optional and the default movement mode is 'current'.
'begin' - Move the file pointer given number of bytes from beginning of the file.
'end' - Move the file pointer given number of bytes from the end of the file.
'current' - Move the file pointer given number of bytes from the current position in the file.

If oFileUtil.Open("C:\autoexec.bat") Then
oFileUtil.Seek(10)
Response.Write "Position: " & oFileUtil.GetPosition()
Else
Response.Write "autoexec.bat file could not be opened."
End If
SeekToBegin()
Moves the file read/write cursor to the begining of the file.

Return value:
None

If oFileUtil.Open("C:\autoexec.bat") Then
oFileUtil.SeekToBegin()
Response.Write "Position: " & oFileUtil.GetPosition()
Else
Response.Write "autoexec.bat file could not be opened."
End If
SeekToEnd()
Moves the file read/write cursor to the end of the file.

Return value:
None

If oFileUtil.Open("C:\autoexec.bat") Then
oFileUtil.SeekToEnd()
Response.Write "Position: " & oFileUtil.GetPosition()
Else
Response.Write "autoexec.bat file could not be opened."
End If
GetAccessedTime(Filename - String)
Returns the time when the file was last accessed as a string.

Return value:
STRING - Date and time when the file was last accessed.

Filename - Name of the file including path whose 'Accessed Time' needs to be retrieved.

Response.Write oFileUtil.GetAccessedTime("c:\autoexec.bat")
GetCreatedTime(Filename - String)
Returns the time when the file was created as a string.

Return value:
STRING - Date and time when the file was created.

Filename - Name of the file including path whose 'Created Time' needs to be retrieved.

Response.Write oFileUtil.GetCreatedTime("c:\autoexec.bat")
GetModifiedTime(Filename - String)
Returns the time when the file was last modified as a string.

Return value:
STRING - Date and time when the file was last modified.

Filename - Name of the file including path whose 'Modified Time' needs to be retrieved.

Response.Write oFileUtil.GetModifiedTime("c:\autoexec.bat")
GetAttributes(Filename - String)
Returns the attributes of the file as a string.

Return value:
STRING - Attributes of the file as a string. Attributes can be any combination of the following: "ASHRN".
"A" - archive, "S" - system, "H" - hidden, "R" - readonly, "N" - none

Filename - Name of the file including path whose 'Attributes' needs to be retrieved.

Response.Write oFileUtil.GetAttributes("c:\autoexec.bat")
GetSize(Filename - String)
Returns the size of the file as an integer.

Return value:
INTEGER - Size of file as an integer.

Filename - Name of the file including path whose size needs to be retrieved.

Response.Write "File size: " & oFileUtil.GetSize("c:\autoexec.bat")
Remove(Filename - String)
Deletes the file.

Return value:
None

Filename - Name of the file including full path which needs to be deleted.

strFilename = "c:\autoexec.bat"
oFileUtil.Remove(cstr(strFilename))
Rename(Oldfilename - String, Newfilename - String)
Renames the given file.

Return value:
None

OldFilename - Name of file including path which needs to be renamed.
NewFilename - New name of the file.

oFileUtil.Rename("c:\autoexec.bat","autoexec.txt")
SetAccessedTime(Filename - String, Year - Integer, Month - Integer, Day - Integer,
Hour - Integer, Min - Integer, Sec - Integer, dst - Integer)
Sets the accessed time of the file. Accessed time is an attribute of the file which can be modified.

Return value:
None

Filename - Name of file including path whose accessed time needs to be modified.
Year - Year as an integer.
Month - Month as an integer.
Day - Day as an integer.
Hour - Hour as an integer.
Minute - Minute as an integer.
Second - Second as an integer.
dst - This parameter is the daylight savings time. Its value can be 0,1 and -1. Pass 0 if daylight savings is turned off. Pass 1 if daylight savings is on. Pass -1 if daylight savings does not apply to the country.

oFileUtil.SetAccessedTime "C:\autoexec.bat", 2001, 01, 18, 09, 34, 52, 1
SetCreatedTime(Filename - String, Year - Integer, Month - Integer, Day - Integer,
Hour - Integer, Min - Integer, Sec - Integer, dst - Integer)
Sets the created time of the file. Created time is an attribute of the file which can be modified.

Return value:
None

Filename - Name of file including path whose created time needs to be modified.
Year - Year as an integer.
Month - Month as an integer.
Day - Day as an integer.
Hour - Hour as an integer.
Minute - Minute as an integer.
Second - Second as an integer.
dst - This parameter is the daylight savings time. Its value can be 0,1 and -1. Pass 0 if daylight savings is turned off. Pass 1 if daylight savings is on. Pass -1 if daylight savings does not apply to the country.

oFileUtil.SetCreatedTime "C:\autoexec.bat", 2001, 01, 18, 09, 34, 52, 1
SetModifiedTime(Filename - String, Year - Integer, Month - Integer, Day - Integer,
Hour - Integer, Min - Integer, Sec - Integer, dst - Integer)
Sets the modified time of the file. Modified time is an attribute of the file which can be modified.

Return value:
None

Filename - Name of file including path whose modified time needs to be altered.
Year - Year as an integer.
Month - Month as an integer.
Day - Day as an integer.
Hour - Hour as an integer.
Minute - Minute as an integer.
Second - Second as an integer.
dst - This parameter is the daylight savings time. Its value can be 0,1 and -1. Pass 0 if daylight savings is turned off. Pass 1 if daylight savings is on. Pass -1 if daylight savings does not apply to the country.

oFileUtil.SetModifiedTime "C:\autoexec.bat", 2001, 01, 18, 09, 34, 52, 1
SetSize(Filename - String, Size - Integer)
Sets the modified time of the file. Modified time is an attribute of the file which can be modified.

Return value:
None

Filename - Name of file including path whose size needs to be altered.
Size - New size of the file as an integer.

oFileUtil.SetSize "C:\autoexec.bat", 10
SetAttributes(Filename - String, Attributes - String)
Modify the attributes of the file using this method. Attributes which can be modified include Archive, System File, Hidden and Readonly.

Return value:
None

Filename - Name of file including path whose size needs to be altered.
Attributes - Attributes can be any combination of the following: "ASHRN".
"A" - archive, "S" - system, "H" - hidden, "R" - readonly, "N" - none .

oFileUtil.SetAttributes "C:\autoexec.bat", "AR"


DynuCOM Version 3.0 - DynuFTP Methods and Properties

DynuFTP Methods and Properties

Dynu.FTP
ExpressGetFile(Server - String, RemoteFile - String, LocalFileName - String, [Username - String], [Password - String],
[Port - Integer], [Passive - Boolean], [TransferType - String],
[FailIfExists - Boolean], [Timeout - Integer], [Retries - Integer])
ExpressPutFile(Server - String, LocalFile - String, RemoteFile - String, [Username - String],
[Password - String], [Port - Integer], [Passive - Boolean], [TransferType - String], [Timeout - Integer],
[Retries - Integer])
Connect(Host - String, [Username - String], [Password - String], [Port - Integer],
[Acct - String], [Fwhost - String], [Fwusername - String], [Fwpassword - String], [Fwport - Integer],
[LogonType - Integer], [Passive - Boolean])
PutFile(LocalFile - String, RemoteFile - String, [Passive - Boolean], [TransferType - String])
GetFile(RemoteFile - String, [LocalFile - String], [Passive - Boolean], [TransferType - String])
MPUT(LocalDirectory - String)
MGET(LocalDirectory - String)
RecursiveUpload(LocalDirectory - String)
RecursiveDownload(LocalDirectory - String)
GetFileList()
DeleteFile(Filename - String)
DeleteAllFiles()
GetDirectoryList()
MakeDirectory(Directory - Sting)
RemoveDirectory(Directory - String)
RemoveAllDirectories()
GetCurrentDirectory()
ChangeDirectory(Directory - String)
ExecuteCommand(Command - String)
Close()
ReturnMessage as String

- Method [image] - Property

Methods
ExpressGetFile(Server - String, RemoteFile - String, [LocalFileName - String], [Username - String], [Password - String],
[Port - Integer], [Passive - Boolean], [TransferType - String],
[FailIfExists - Boolean], [Timeout - Integer], [Retries - Integer])
Description:
Logs on to FTP server and downloads a file.

Return value:
TRUE - Download of file successful.
FALSE - Unable to download the file.

Parameters:
Server - Ftp server from which to dowload the file as a string.
RemoteFile - Filename of file on FTP server to be downloaded as a string.
LocalFileName - Filename including path where downloaded file is to be saved as a string.
Username - FTP username used for authentication as a string. This parameter is optional and need not be passed for anonymous login.
Password - FTP password used for authentication as a string. This parameter is optional and need not be passed for anonymous login.
Port - Port number of FTP server as an integer. This parameter is optional and the default value is 21.
Passive - This parameter must be set to boolean value TRUE if passive transfer type is required. This parameter is optional and the default value is FALSE. Passive transfer is useful in firewall based environment. In passive transfer, the same TCP/IP connection is used for file transfer. A new connection is not made as in case of regular file transfer.
TransferType - Pass in string 'ascii' if ASCII based file transfer is required. This parameter is option and the default value is 'binary'.
FailIfExists - This parameter must be set to boolean value TRUE if the download should fail if the file already exists on the local computer. This is useful to prevent overwriting a file which already exists on the local computer. This parameter is option and the default value is FALSE.
Timeout - Timeout value for terminating login process as an integer. This parameter is option and the default value is to 30 seconds.
Retries - Number of times to retry login process as an integer. This parameter is option and the default value is 5.

Example:
pServer = "ftp.dynu.com"
pRemotefile = "dynucom.zip"
pLocalfile = "c:\dynucom.zip"
If oFTP.ExpressGetFile(cstr(pServer), cstr(pRemotefile), cstr(pLocalfile)) Then
Response.Write "Download completed successfully!"
Else
Response.Write "Download failed!"
End If

! - Always use cstr() around variables passed in as parameters
ExpressPutFile(Server - String, LocalFile - String, [RemoteFile - String], [Username - String],
[Password - String], [Port - Integer], [Passive - Boolean], [TransferType - String], [Timeout - Integer],
[Retries - Integer])
Description:
Logs on to FTP server and uploads a file.

Return value:
TRUE - Upload of file successful.
FALSE - Unable to upload the file.

Parameters:
Server - Hostname of Ftp server from which to dowload the file as a string.
LocalFile - Filename including path which must be uploaded to the FTP server as a string.
RemoteFileName - Filename which to be used when file is saved on to the FTP server as a string.
Username - FTP username used for authentication as a string. This parameter is optional and need not be passed for anonymous login.
Password - FTP password used for authentication as a string. This parameter is optional and need not be passed for anonymous login.
Port - Port number of FTP server as an integer. This parameter is optional and the default value is 21.
Passive - This parameter must be set to boolean value TRUE if passive transfer type is required. This parameter is optional and the default value is FALSE. Passive transfer is useful in firewall based environment. In passive transfer, the same TCP/IP connection is used for file transfer. A new connection is not made as in case of regular file transfer.
TransferType - Pass in string 'ascii' if ASCII based file transfer is required. This parameter is option and the default value is 'binary'.
Timeout - Timeout value for terminating login process as an integer. This parameter is option and the default value is to 30 seconds.
Retries - Number of times to retry login process as an integer. This parameter is option and the default value is 5.

Example:
pServer = "ftp.dynu.com"
pLocalfile = "c:\autoexec.bat"
pRemotefile = "autoexec.bat"
If oFTP.ExpressPutFile(cstr(pServer), cstr(pLocalfile), cstr(pRemotefile)) Then
Response.Write "Download completed successfully!"
Else
Response.Write "Download failed(because upload is not allowed on dynu FTP server)!"
End If

! - Always use cstr() around variables passed in as parameters
Connect(Host - String, [Username - String], [Password - String], [Port - Integer],
[Acct - String], [Fwhost - String], [Fwusername - String], [Fwpassword - String], [Fwport - Integer],
[LogonType - Integer], [Passive - Boolean])
Description:
Logs on to FTP server. Please note that upon expiration of trial period, this method will always return FALSE.

Return value:
TRUE - Login successful.
FALSE - Login failed.

Parameters:
Host - Hostname of FTP server as a string.
Username - FTP username used for authentication as a string. This parameter is optional and need not be passed for anonymous login.
Password - FTP password used for authentication as a string. This parameter is optional and need not be passed for anonymous login.
Port - Port number of FTP server as an integer. This parameter is optional and the default value is 21.
Acct - Account string is a string which is passed to the firewall for firewall logon purposes. Most firewalls have port 21 open for FTP purposes and normally this parameter need not be used. This parameter is optional.
Fwhost - Hostname of the firewall through which to login. This parameter is optional.
Fwusername - Username to be used to login through the firewall. This parameter is optional.
Fwpassword - Password to be used to login through the firewall. This parameter is optional.
Fwport - Firewall port as an integer. This parameter is optional.
LogonType - Logon type as an integer 0-8. This parameter is optional and the default value is 0. Valid logon sequences are listed below:
0 - None
1 - Site hostname
2 - User after logon
3 - Proxy Open
4 - Transparent
5 - User with no logon
6 - User FireID@RemoteHost
7 - User remoteID@remoteHost fireID
8 - User remoteID@fireID@remoteHost
Passive - This parameter must be set to boolean value TRUE if passive transfer type is required. This parameter is optional and the default value is FALSE. Passive transfer is useful in firewall based environment. In passive transfer, the same TCP/IP connection is used for file transfer. A new connection is not made as in case of regular file transfer.

Example:
pServer = "ftp.dynu.com"
pUsername = "anonymous"
pPassword = "s@s.com"
If oFTP.Connect(cstr(pServer), cstr(pUsername), cstr(pPassword), 21) Then
Response.Write "Logged on to Ftp server successfully!"
Else
Response.Write "Login to Ftp server failed!"
End If

! - Always use cstr() around variables passed in as parameters
PutFile(LocalFile - String, RemoteFile - String, [Passive - Boolean], [TransferType - String])
Description:
Uploads a file to the Ftp server.

Return value:
TRUE - File uploaded successfully.
FALSE - Upload of file failed.

Parameters:
LocalFile - Filename including path of file to be uploaded to the Ftp server as a string.
RemoteFile - Filename which to be used when file is saved on to the FTP server as a string.
Passive - This parameter must be set to boolean value TRUE if passive transfer type is required. This parameter is optional and the default value is FALSE. Passive transfer is useful in firewall based environment. In passive transfer, the same TCP/IP connection is used for file transfer. A new connection is not made as in case of regular file transfer.
TransferType - Pass in string 'ascii' if ASCII based file transfer is required. This parameter is option and the default value is 'binary'.

Example:
pServer = "ftp.dynu.com"
pUsername = "anonymous"
pPassword = "s@s.com"
pLocalfile = "c:\autoexec.bat"
pRemoteFile = "autoexec.bat"
If oFTP.Connect(cstr(pServer), cstr(pUsername), cstr(pPassword), 21) Then
Response.Write "Logged on to Ftp server successfully!"
If oFtp.PutFile(cstr(pLocalfile), cstr(pRemoteFile)) Then
Response.Write "File uploaded successfully!"
Else
Response.Write "File upload failed(because upload not permitted on Dynu Ftp server)!"
End If
Else
Response.Write "Login to Ftp server failed!"
End If

! - Always use cstr() around variables passed in as parameters
GetFile(RemoteFile - String, [LocalFile - String], [Passive - Boolean], [TransferType - String])
Description:
Downloads a file from the FTP server.

Return value:
TRUE - File downloaded successfully.
FALSE - Download of file failed.

Parameters:
RemoteFile - Filename of file on FTP server to be downloaded as a string.
LocalFile - Filename including path where downloaded file is to be saved as a string. This parameter is optional and the default path where downloaded files are saved is c:\.
Passive - This parameter must be set to boolean value TRUE if passive transfer type is required. This parameter is optional and the default value is FALSE. Passive transfer is useful in firewall based environment. In passive transfer, the same TCP/IP connection is used for file transfer. A new connection is not made as in case of regular file transfer.
TransferType - Pass in string 'ascii' if ASCII based file transfer is required. This parameter is option and the default value is 'binary'.

Example:
pServer = "ftp.dynu.com"
pRemotefile = "dynucom.zip"
If oFTP.Connect(cstr(pServer)) Then
Response.Write "Logged on to Ftp server successfully!"
If oFtp.GetFile(cstr(pRemotefile)) Then
Response.Write "File downloaded successfully!"
Else
Response.Write "File download failed!"
End If
Else
Response.Write "Login to Ftp server failed!"
End If

! - Always use cstr() around variables passed in as parameters
MPUT(LocalDirectory - String)
Description:
Uploads all files in local directory specified to the Ftp server.

Return value:
INTEGER - Number of files uploaded successfully.

Parameters:
LocalDirectory - Path of directory whose files are to be uploaded to the FTP server as a string.

Example:
pServer = "ftp.dynu.com"
pLocaldirectory = "c:\temp"
If oFTP.Connect(cstr(pServer)) Then
iNum = oFtp.MPUT(cstr(pLocaldirectory))
Response.Write "Number of files uploaded: " & iNum
Else
Response.Write "Login to Ftp server failed!"
End If

! - Always use cstr() around variables passed in as parameters
MGET(LocalDirectory - String)
Description:
Downloads all files in the current path of Ftp server.

Return value:
INTEGER - Number of files downloaded successfully.

Parameters:
LocalDirectory - Path of directory where files downloaded from the FTP server should be saved as a string.

Example:
pServer = "ftp.dynu.com"
pLocaldirectory = "c:\"
If oFTP.Connect(cstr(pServer)) Then
oFTP.ChangeDirectory("test")
iNum = oFtp.MGET(cstr(pLocaldirectory))
Response.Write "Number of files downloaded: " & iNum
Else
Response.Write "Login to Ftp server failed!"
End If

! - Always use cstr() around variables passed in as parameters
RecursiveUpload(LocalDirectory - String)
Description:
Uploads the entire content of the local directory specified including subdirectories and files inside of them.

Return value:
INTEGER - Number of files uploaded successfully.

Parameters:
LocalDirectory - Path of directory whose contents are to be uploaded to the FTP server as a string.

Example:
pServer = "ftp.dynu.com"
pLocaldirectory = "c:\temp" If oFTP.Connect(cstr(pServer)) Then
iNum = oFtp.RecursiveUpload(cstr(pLocaldirectory))
Response.Write "Number of files uploaded: " & iNum
Else
Response.Write "Login to Ftp server failed!"
End If

! - Always use cstr() around variables passed in as parameters
RecursiveDownload(LocalDirectory - String)
Description:
Downloads all files, directories, subdirectories etc in the current path of Ftp server.

Return value:
INTEGER - Number of files downloaded successfully.

Parameters:
LocalDirectory - Path of directory where files/directories downloaded from the FTP server should be saved as a string.

Example:
pServer = "ftp.dynu.com"
pLocaldirectory = "c:\" If oFTP.Connect(cstr(pServer)) Then
iNum = oFtp.RecursiveDownload(cstr(pLocaldirectory))
Response.Write "Number of files downloaded: " & iNum
Else
Response.Write "Login to Ftp server failed!"
End If

! - Always use cstr() around variables passed in as parameters
GetFileList()
Description:
Gets a list of files in the current path of Ftp server.

Return value:
STRING - List of files in current path of Ftp server.

Parameters:
None

Example:
pServer = "ftp.dynu.com"
If oFTP.Connect(cstr(pServer)) Then
strFileList = oFtp.GetFileList()
Response.Write strFileList
Else
Response.Write "Login to Ftp server failed!"
End If
DeleteFile(Filename - String)
Description:
Deletes the file specified on the Ftp server.

Return value:
TRUE - File deleted successfully.
FALSE - Delete operation failed.

Parameters:
Filename - Name of file on FTP server which should be deleted.

Example:
pServer = "ftp.dynu.com"
If oFTP.Connect(cstr(pServer)) Then
If oFTP.DeleteFile("dynucom.zip") Then
Response.Write "dynucom.zip file deleted!"
Else
Response.Write "File could not be deleted!"
End If
Else
Response.Write "Login to Ftp server failed!"
End If

! - Always use cstr() around variables passed in as parameters
DeleteAllFiles()
Description:
Deletes all file in the current path on the Ftp server.

Return value:
TRUE - Files deleted successfully.
FALSE - Delete operation failed for one or more files.

Parameters:
None

Example:
pServer = "ftp.dynu.com"
If oFTP.Connect(cstr(pServer)) Then
If oFTP.DeleteAllFile() Then
Response.Write "All files deleted!"
Else
Response.Write "One or more files could not be deleted!"
End If
Else
Response.Write "Login to Ftp server failed!"
End If
GetDirectoryList()
Description:
Gets a list of directories in the current path of Ftp server.

Return value:
STRING - List of directories in current path of Ftp server.

Parameters:
None

Example:
pServer = "ftp.dynu.com"
If oFTP.Connect(cstr(pServer)) Then
strDirectoryList = oFtp.GetDirectoryList()
Response.Write strDirectoryList
Else
Response.Write "Login to Ftp server failed!"
End If
MakeDirectory(Directory - Sting)
Description:
Create a new directory in the current path of Ftp server.

Return value:
TRUE - Directory created successfully.
FALSE - Directory creation failed.

Parameters:
Directory - Directory name as a string.

Example:
pServer = "ftp.dynu.com"
If oFTP.Connect(cstr(pServer)) Then
If oFTP.MakeDirectory("Blah") Then
Response.Write "Directory created successfully!"
Else
Response.Write "Directory creation failed!"
End If
Else
Response.Write "Login to Ftp server failed!"
End If

! - Always use cstr() around variables passed in as parameters
RemoveDirectory(Directory - Sting)
Description:
Deletes the specified directory from the Ftp server.

Return value:
TRUE - Directory successfully removed.
FALSE - Directory removal failed.

Parameters:
Directory - Directory name of directory which needs to be deleted as a string.

Example:
pServer = "ftp.dynu.com"
If oFTP.Connect(cstr(pServer)) Then
If oFTP.RemoveDirectory("test") Then
Response.Write "Directory deleted successfully!"
Else
Response.Write "Directory creation failed!"
Response.Write oFTP.ReturnMessage
End If
Else
Response.Write "Login to Ftp server failed!"
End If

! - Always use cstr() around variables passed in as parameters
RemoveAllDirectories()
Description:
Remove all directories in the current path of Ftp server.

Return value:
TRUE - Directories removed successfully.
FALSE - One or more directories could not be removed.

Parameters:
None
Example:
pServer = "ftp.dynu.com"
If oFTP.Connect(cstr(pServer)) Then
If oFTP.RemoveAllDirectories() Then
Response.Write "Directories deleted successfully!" Else
Response.Write "One or more directories could not be deleted!"
Response.Write oFTP.ReturnMessage
End If
Else
Response.Write "Login to Ftp server failed!"
End If
GetCurrentDirectory()
Description:
This method returns the current directory name on the Ftp server.

Return value:
STRING - Name of current directory.

Parameters:
None
Example:
pServer = "ftp.dynu.com"
If oFTP.Connect(cstr(pServer)) Then
Response.Write "Loged on to Ftp server!"
oFTP.ChangeDirectory("test")
Response.Write "Now located in directory " & oFTP.GetCurrentDirectory
Else
Response.Write "Login to Ftp server failed!"
End If
ChangeDirectory(Directory - String)
Description:
Changes the current directory on the Ftp server.

Return value:
TRUE - Directory changed successfully.
FALSE - Could not change to directory specified.

Parameters:
Directory - Directory name to change into. Please pass in directory name '..' if you would like to go up one level.

Example:
pServer = "ftp.dynu.com"
If oFTP.Connect(cstr(pServer)) Then
If oFTP.ChangeDirectory("test") Then
Response.Write "Now located in directory " & oFTP.GetCurrentDirectory
Else
Response.Write "Could not change to directory 'test'!" & oFTP.ReturnMessage
End If
Else
Response.Write "Login to Ftp server failed!"
End If

! - Always use cstr() around variables passed in as parameters
ExecuteCommand(Command - String)
Description:
Executes the FTP command on the Ftp server. This method is quite useful to execute custom commands like SITE, NOOP, SYST etc.

Return value:
STRING - Returns the response of the Ftp server as a string.

Parameters:
Command - Complete FTP command as a string. Please refer to RFC 959 and FTP server documentation to find out syntax of FTP commands supported by the FTP server.

Example:
pServer = "ftp.dynu.com"
If oFTP.Connect(cstr(pServer)) Then
Response.Write oFTP.ExecuteCommand("NOOP")
Response.Write oFTP.ExecuteCommand("SYST")
Response.Write oFTP.ExecuteCommand("CWD test")
Else
Response.Write "Login to Ftp server failed!"
End If

! - Always use cstr() around variables passed in as parameters
Close()
Description:
Disconnects from the Ftp server.

Return value:
None
Parameters:
None
Example:
pServer = "ftp.dynu.com"
If oFTP.Connect(cstr(pServer)) Then
Response.Write "Logged on..." oFTP.Close Response.Write "...disconnected from Ftp server!" Else
Response.Write "Login to Ftp server failed!"
End If
ReturnMessage as String
Description:
This string holds the last response from the Ftp server.

Example:
pServer = "ftp.dynu.com"
If oFTP.Connect(cstr(pServer)) Then
Response.Write oFTP.ReturnMessage
Else
Response.Write oFTP.ReturnMessage
End If


DynuCOM Version 3.0 - DynuHTTP Methods and Properties

DynuHTTP Methods and Properties

Dynu.HTTP
SetURL(URL - String)
SetQueryString(QueryString - String)
SetFormData(Key - String, Value - String)
SetHeader(Key - String, Value - String)
GetHeader()
GetSecureHeader()
GetURL()
GetSecureURL()
PostURL()
PostSecureURL()
SetAuthorization(Username - String, Password - String)
SetServer(Server - String)
SetPort(Port - Integer)
SetSSLPort(SSLPort - Integer)
SetTimeout(Timeout - Integer)
Reset()

- Method [image] - Property

Methods
SetURL(URL - String)
Sets the URL to be fetched. This method is absolutely required. If the URL is 'https' then the GetHeader, GetURL and PostURL methods will automatically use SSL protocol to retrieve the page.

URL - URL to be fetched as a string.

oHTTP.SetURL("http://www.dynu.com/dynuhttptest.asp")
oHTTP.SetURL("https://www.dynu.com/dynuhttptest.asp")
SetQueryString(QueryString - String)
Sets the querystring to be passed with the URL. This method is used to pass parameters in the URL. Usage of this method a second time will overwrite the previously passed querystring.

QueryString - Querystring to be passed with the URL.

oHTTP.SetQueryString("id=110")
or
oHTTP.SetQueryString("name=joe&city=chicago")
SetFormData(Key - String, Value - String)
Set the form data using this method before performing a PostURL method. This method may be used more than once to pass in more form data.

Key - Name of the form field as a string.
Value - Value of the form field as a string.

oHTTP.SetFormData("name", "joe")
oHTTP.SetFormData("city", "chicago")
SetHeader(Key - String, Value - String)
Set the header fields using this method. This method may be used more than once to pass in more header fields.

Key - Name of the header field as a string.
Value - Value of the header field as a string.

oHTTP.SetHeader("user-agent", "DynuHTTP")
oHTTP.SetHeader("referer", "http://www.somedomain.com/somepage.asp")
GetHeader()
Fetch the header of a web page using this method. If SetURL method received an 'https' based URL, the page header will be fetched based on SSL protocol automatically.
Return value:
STRING - Returns the header of web page as a string.

sHeader = oHTTP.GetHeader()
Response.Write sHeader
GetSecureHeader()
Fetch the header of a web page via SSL protocol using this method.
Return value:
STRING - Returns the header of web page as a string.

sHeader = oHTTP.GetSecureHeader()
Response.Write sHeader
GetURL()
Fetches a web page using GET method. Please set an URL using the SetURL method before calling this method. If the SetURL method receives a 'https' based URL, the page will be fetched using GET method based on SSL protocol automatically.
Return value:
STRING - Returns the web page as a string.

oHTTP.SetURL("http://www.dynu.com/dynuhttpsample.asp")
Response.Write oHTTP.GetURL()
GetSecureURL()
Fetch a web page via SSL protocol using this method.
Return value:
STRING - Returns the web page as a string.

oHTTP.SetURL("http://www.dynu.com/dynuhttpsample.asp")
Response.Write oHTTP.GetSecureURL()
PostURL()
Fetches a web page via POST method. Use SetFormData() method to set the form fields. If the SetURL method receives a 'https' based URL, the page will be fetched using POST method based on SSL protocol automatically.
Return value:
STRING - Returns the result of the POST as a string.

oHTTP.SetURL("http://www.dynu.com/dynuhttpsample.asp")
oHTTP.SetFormData("name", "joe")
oHTTP.SetFormData("city", "chicago")
Response.Write oHTTP.PostURL()
PostSecureURL()
Fetches a web page using POST method via SSL. Use SetFormData() method to set the form fields.
Return value:
STRING - Returns the result of the SSL based POST as a string.

oHTTP.SetURL("http://www.dynu.com/dynuhttpsample.asp")
oHTTP.SetFormData("name", "joe")
oHTTP.SetFormData("city", "chicago")
Response.Write oHTTP.PostSecureURL()
SetAuthorization(Username - String, Password - String)
Sets the authorization parameters to be used when communicating with remote web server.

Username - Username as a string.
Password - Password as a string.

oHTTP.SetAuthorization("joe", "joepassword")
SetServer(Server - String)
Sets the hostname of the remote web server. This method is optional as the name of web server is parsed from the URL.

Server - Server hostname as a string.

oHTTP.SetServer("dynu.com")
SetPort(Port - Integer)
Sets the port of the remote web server to connect to. This method is optional and the default value is set to 80.

Port - Port number as an Integer.

oHTTP.SetPort(81)
SetSSLPort(SSLPort - Integer)
Sets the SSL port of the remote web server to connect to. This method is optional and the default value is set to 443.

Port - SSL Port number as an Integer.

oHTTP.SetSSLPort(444)
SetTimeout(Timeout - Integer)
Sets the timeout in seconds. This method is optional and the default value is set to 20 seconds.

Timeout - Timeout in seconds as an Integer.

oHTTP.SetTimeout(10)
Reset()
This method resets all internal variables. This can be used to clear URL, form, querystring and header data.

oHTTP.Reset()


DynuCOM Version 3.0 - DynuPOP3 Methods and Properties

DynuPOP3 Methods and Properties

Dynu.POP3
Connect(Host - String, Username - String, Password - String, [Port - Integer])
Close()
GetStatistics()
GetUIDL()
RetrieveMessage(nMsg - Integer, [DeleteMessage - Boolean])
Delete(MessageNumber - Integer)
GetAttachmentName(Count - Integer)
GetAttachmentSize(Count - Integer)
GetAttachmentType(Count - Integer)
SaveAttachment(Path - String, Count - Integer, [Filename - String])
ClearLog()
Logging as Boolean
Log as String
NumberOfMessages as Integer
MailboxSize as Integer
Date as String
Size as Integer
From as String
FromName as String
ReplyTo as String
To as String
ToName as String
Cc as String
Bcc as String
MessageID as String
Priority as Integer
Organization as String
Subject as String
Body as String
HTMLBody as String
Header as String
RawBody as String
NumberOfAttachments as String

- Method [image] - Property

Methods
Connect(Host - String, Username - String, Password - String, [Port - Integer])
Description:
Connects and logs into POP server.

Return value:
TRUE - Login into POP server successful.
FALSE - Login into POP server failed.

Parameters:
Host - Host name of POP server as a string.
Username - Username used for login as a string.
Password - Password used for login as a string.
Port - Port number of POP server as an integer. This parameter is optional and the default value is 110.

Example:
If oPOP3.Connect("pop.dynu.com", "test", "test") Then
Response.Write "Connected to Dynu pop server!"
Else
Response.Write "Connection to Dynu POP server failed!"
End If
Close()
Description:
Closes connection to POP server by issuing the QUIT command. All messages marked to be deleted are purged permanently by POP3 server upon receipt of QUIT command.

Return value:
None

Example:
If oPOP3.Connect("pop.dynu.com", "test", "test") Then
Response.Write "Connected to Dynu pop server!"
oPOP3.Close
Else
Response.Write "Connection to Dynu POP server failed!"
End If
GetStatistics()
Description:
This method gets number of messages and their sizes on the POP3 server. This method must be called right after calling connect method. Properties NumberOfMessages and MailboxSize may be used after the GetStatistics() method.

Return value:
None

Example:
If oPOP3.Connect("pop.dynu.com", "test", "test") Then
Response.Write "Connected to Dynu pop server!"
oPOP3.GetStatistics
Response.Write "Total messages on POP server: " & oPOP3.NumberOfMessages
Response.Write "Total size of emails on POP server: " & oPOP3.MailboxSize
Else
Response.Write "Connection to Dynu POP server failed!"
End If
GetUIDL()
Description:
This method gets list of message UIDL currently on the POP3 server. This method may only be called after a successful connect method. This method is very useful to retrieve only message which the client has not already downloaded and also to identify new messages.

Return value:
STRING - UIDL listing of messages currently on POP3 server.

Example:
If oPOP3.Connect("pop.dynu.com", "test", "test") Then
Response.Write "Connected to Dynu pop server!"
Response.Write oPOP3.GetUIDL()
Else
Response.Write "Connection to Dynu POP server failed!"
End If
RetrieveMessage(nMsg - Integer, [DeleteMessage - Boolean])
Description:
This method retrieves one email message from the POP server. Properties like From, FromName, Subject, Date, Body etc can be used to display details of the email message after successful usage of RetrieveMessage method.

Return value:
TRUE - Successfully retrieved email message from POP server.
FALSE - Email message could not be retrieved from POP server.

Parameters:
nMsg - Message number as an integer.
DeleteMessage - Pass in boolean value TRUE, if the message should be deleted from POP server once it is retrieved. This parameter is optional and the default value is FALSE.

Example:
If oPOP3.Connect("pop.dynu.com", "test", "test") Then
Response.Write "Connected to Dynu pop server!"
oPOP3.GetStatistics
If oPOP3.NumberOfMessages > 1 Then
If oPOP3.RetrieveMessage(1) Then
Response.Write "Email message from: " & oPOP3.From
End If
Else
Response.Write "No messages on POP server!"
End If
Else
Response.Write "Connection to Dynu POP server failed!"
End If
Delete(MessageNumber - Integer)
Description:
This method deletes one email message from the POP server. Please use the Close() method to disconnect from POP3 server since according to POP3 RFC, messages marked to be deleted are permanently purged only on the QUIT command which is issued in the Close() method.

Return value:
NONE

Parameters:
MessageNumber - Message number as an integer.

Example:
If oPOP3.Connect("pop.dynu.com", "test", "test") Then
Response.Write "Connected to Dynu pop server!"
oPOP3.GetStatistics
If oPOP3.NumberOfMessages > 1 Then
If oPOP3.Delete(1) Then
Response.Write "Email message deleted!"
End If
Else
Response.Write "No messages on POP server!"
End If
Else
Response.Write "Connection to Dynu POP server failed!"
End If
GetAttachmentName(Count - Integer)
Description:
Use this method get the name of the attachment for the email message retrieved.

Return value:
STRING - Filename of attachment.

Parameters:
Count - Attachment number as an integer. Use NumberOfAttachments property to check the number of attachments exist in the email message.

Example:
If oPOP3.Connect("pop.dynu.com", "test", "test") Then
Response.Write "Connected to Dynu pop server!"
oPOP3.GetStatistics
If oPOP3.NumberOfMessages > 1 Then
If oPOP3.RetrieveMessage(1) Then
If oPOP3.NumberOfAttachments > 0 Then
Response.Write "First attachment name: " & oPOP3.GetAttachmentName(1) End If
End If
End If
Else
Response.Write "Connection to Dynu POP server failed!"
End If
GetAttachmentSize(Count - Integer)
Description:
Use this method get the size of the attachment for the email message retrieved.

Return value:
INTEGER - Size of attachment in bytes.

Parameters:
Count - Attachment number as an integer. Use NumberOfAttachments property to check the number of attachments exist in the email message.

Example:
If oPOP3.Connect("pop.dynu.com", "test", "test") Then
Response.Write "Connected to Dynu pop server!"
oPOP3.GetStatistics
If oPOP3.NumberOfMessages > 1 Then
If oPOP3.RetrieveMessage(1) Then
If oPOP3.NumberOfAttachments > 0 Then
Response.Write "First attachment size: " & oPOP3.GetAttachmentSize(1) End If
End If
End If
Else
Response.Write "Connection to Dynu POP server failed!"
End If
GetAttachmentType(Count - Integer)
Description:
Use this method get the type of the attachment for the email message retrieved. If the type of attachment is 'text/html', then the HTMLBody property can display the HTML based body of the email.

Return value:
STRING - Type of attachment.

Parameters:
Count - Attachment number as an integer. Use NumberOfAttachments property to check the number of attachments exist in the email message.

Example:
If oPOP3.Connect("pop.dynu.com", "test", "test") Then
Response.Write "Connected to Dynu pop server!"
oPOP3.GetStatistics
If oPOP3.NumberOfMessages > 1 Then
If oPOP3.RetrieveMessage(1) Then
If oPOP3.NumberOfAttachments > 0 Then
Response.Write "First attachment type: " & oPOP3.GetAttachmentType(1) End If
End If
End If
Else
Response.Write "Connection to Dynu POP server failed!"
End If
SaveAttachment(Path - String, Count - Integer, [Filename - String])
Description:
Use this method save an attachment of an email message on to the local hard drive.

Return value:
TRUE - Attachment saved successfully.
FALSE - Failed to save attachment.

Parameters:
Path - Path to save the attachment to. This path should not include a filename. The attachment will be saved under its original filename.
Count - Attachment number as an integer. Use NumberOfAttachments property to check the number of attachments exist in the email message.
Filename - Filename to be used to save the file as. This parameter is optional and if this parameter is not supplied the attachment's filename will be automatically used.

Example:
If oPOP3.Connect("pop.dynu.com", "test", "test") Then
Response.Write "Connected to Dynu pop server!"
oPOP3.GetStatistics
If oPOP3.NumberOfMessages > 1 Then
If oPOP3.RetrieveMessage(1) Then
If oPOP3.NumberOfAttachments > 0 Then
If oPOP3.SaveAttachment("c:\inetpub\wwwroot\attachment", 1) Then
Response.Write "Attachment " & oPOP3.GetAttachmentName(1) & " saved" End If
End If
End If
End If
Else
Response.Write "Connection to Dynu POP server failed!"
End If
ClearLog()
Description:
Clears the log. Please note that logging is not started by default. Set the value of property 'Logging' to boolean value TRUE to start logging.

Return value:
None

Example:
oPOP3.Logging = TRUE
If oPOP3.Connect("pop.dynu.com") Then
Response.Write "Connected to Dynu pop server!"
Response.Write "Log :" & oPOP3.Log
oPOP3.ClearLog Else
Response.Write "Connection to Dynu POP server failed!"
End If
Logging as Boolean
The 'Logging' property should be set to TRUE if communication with POP server should be logged.

oPOP3.Logging = TRUE
Log as String
The 'Log' property holds the log of all communication with the POP server. Logging will only occur if 'Logging' property is set to boolean value TRUE.

Response.Write oPOP3.Log
NumberOfMessages as Integer
Number of messages on POP server. This property is populated after a successful GetStatistics() method call.

oPOP3.GetStatistics()
Response.Write oPOP3.NumberOfMessages
MailboxSize as Integer
Total size of email messages on POP server. This property is populated after a successful GetStatistics() method call.

oPOP3.GetStatistics()
Response.Write oPOP3.MailboxSize
Date as String
Date of email message. This property is populated after a successful RetrieveMessage() method call.

oPOP3.Retrieve 1
Response.Write oPOP3.Date
Size as Integer
Size of email message. This property is populated after a successful RetrieveMessage() method call.

oPOP3.Retrieve 1
Response.Write oPOP3.Size
From as String
Email address from which email was sent. This property is populated after a successful RetrieveMessage() method call.

oPOP3.Retrieve 1
Response.Write Server.HTMLEncode(oPOP3.From)
FromName as String
Name of person who sent email message. This property is populated after a successful RetrieveMessage() method call.

oPOP3.Retrieve 1
Response.Write oPOP3.FromName
ReplyTo as String
ReplyTo address of email message. This property is populated after a successful RetrieveMessage() method call.

oPOP3.Retrieve 1
Response.Write Server.HTMLEncode(oPOP3.ReplyTo)
To as String
To addresses of email message. This property is populated after a successful RetrieveMessage() method call.

oPOP3.Retrieve 1
Response.Write Server.HTMLEncode(oPOP3.To)
ToName as String
To name of email message. This property is populated after a successful RetrieveMessage() method call.

oPOP3.Retrieve 1
Response.Write oPOP3.ToName
Cc as String
Cc addresses of email message. This property is populated after a successful RetrieveMessage() method call.

oPOP3.Retrieve 1
Response.Write Server.HTMLEncode(oPOP3.Cc)
Bcc as String
Bcc addresses of email message. This property is populated after a successful RetrieveMessage() method call.

oPOP3.Retrieve 1
Response.Write Server.HTMLEncode(oPOP3.Bcc)
MessageID as String
MessageID of email message. This property is populated after a successful RetrieveMessage() method call.

oPOP3.Retrieve 1
Response.Write oPOP3.MessageID
Priority as Integer
Priority of email message. This property is populated after a successful RetrieveMessage() method call. Highest priority is 1 and lowest is 5. Normal priority is 3.

oPOP3.Retrieve 1
Response.Write oPOP3.Priority
Organization as String
Organization of the sender of email message. This property is populated after a successful RetrieveMessage() method call.

oPOP3.Retrieve 1
Response.Write oPOP3.Organization
Subject as String
Subject of email message. This property is populated after a successful RetrieveMessage() method call.

oPOP3.Retrieve 1
Response.Write oPOP3.Subject
Body as String
Body of email message. This property is populated after a successful RetrieveMessage() method call.

oPOP3.Retrieve 1
Response.Write oPOP3.Body
HTMLBody as String
HTML body of email message. This property is populated after a successful RetrieveMessage() method call if the email has HTML based body.

oPOP3.Retrieve 1
Response.Write oPOP3.HTMLBody
Header as String
Complete header of email message which contains information about routing, organization, priority etc. This property is populated after a successful RetrieveMessage() method call.

oPOP3.Retrieve 1
Response.Write oPOP3.Header
RawBody as String
Raw content of email message which contains header as well as all attachments. This property is populated after a successful RetrieveMessage() method call.

oPOP3.Retrieve 1
Response.Write oPOP3.RawBody
NumberOfAttachments as Integer
Number of attachments contained with the email message. This property is populated after a successful RetrieveMessage() method call.

oPOP3.Retrieve 1
If oPOP3.NumberOfAttachments > 0 Then
Response.Write "This email has " & oPOP3.NumberOfAttachments & " attachments!"
End If


DynuCOM Version 3.0 - DynuPing Methods and Properties

DynuPing Methods and Properties

Dynu.Ping
Ping(Host - String, [Count - Integer], [Size - Integer], [Timeout - Integer])

Methods
Ping(Host - String, [Count - Integer], [Size - Integer], [Timeout - Integer])
Ping host or IP Address and display the results.

Host - Hostname or IP Address as a string.
Count - Number of echo requests as an integer. Default is 1.
Size - Packet size in bytes as an integer. Default is 32 bytes.
Timeout - Timeout in milliseconds as an integer. Default is 1000.

oPing.Ping("www.dynu.com", 2, 32, 1000)


DynuCOM Version 3.0 - DynuWait Methods and Properties

DynuWait Methods and Properties

Dynu.Wait
Wait(Seconds - Integer)

- Method [image] - Property

Methods
Wait(Seconds - Integer)
Suspends further execution of code for the number of seconds specified without consuming any system resources.

Seconds - Seconds as an integer.

oWait.Wait(10)


DynuCOM Version 3.0 - DynuSocket Methods and Properties

DynuTCPSocket Methods and Properties

Dynu.TCPSocket
Create([Port - Integer])
Connect(Hostname - String, Port - Integer)
Receive([Bytes - Integer])
Send(Data - String)
Close()
SetTimeout(Seconds - Integer)

- Method [image] - Property

Methods
Create([Port - Integer])
Create a socket to use for TCP/IP communication. The timeout value for the socket is set at 10 seconds by default.
Return value:
TRUE - Socket created successfully.
FALSE - Socket creation failed.

Port - Local port to bind to as an integer. This parameter is optional. If no value is specified, a port will be assigned by the system.

oSocket.Create()

oSocket.Create(1025)
Connect(Hostname - String, Port - Integer)
Connects to the hostname on the port specified.
Return value:
TRUE - Connection established successfully.
FALSE - Connection failed.

Hostname - Hostname or IP Address of the remote server as a string.
Port - Port to connect to on the remote server as an integer.

If oSocket.Connect("ftp.dynu.com", 21) Then
Response.Write "Connected"
Else
Response.Write "Not Connected"
End If

Receive([Bytes - Integer])
Receives data from remote system.
Return value:
STRING - Returns the characters received from remote server as a string. Check length of string to determine the number of bytes received.

Bytes - Number of bytes to receive. This parameter is optional. If no value is specified, up to 4096 bytes will be received.

Response.Write oSocket.Receive()
Send(Data - String)
Sends data as a stream of characters to the remote server.
Return value:
INTEGER - Returns the number of bytes sent to remote server.

Data - Data to be sent to the remote server as a string. Please use 'vbcrlf' for carriage return/line feed combination.

oSocket.Send("USER anonymous" & vbcrlf)
Close()
Closes the socket and releases it back to the system.

oSocket.Close()
SetTimeout(Seconds - Integer)
Sets the timeout for the socket. When trying to connect, send and receive data, this timeout will be enforced.

Seconds - Timeout value in Seconds as an integer. The default value is 10 seconds if this method is not used.

oSocket.SetTimeout(3)


DynuCOM Version 3.0 - DynuUpload Methods and Properties

DynuUpload Methods and Properties

Dynu.Upload
Upload()
GetFileCount()
GetFileName(Count - Integer)
SavePath as String
MaximumSize as Integer
OverWriteFiles as Boolean

- Method [image] - Property

Methods
Upload()
Uploads all files to the user specified directory.
Return value:
STRING - Response of the upload operation. This value is empty if the upload process was successful.

If oUpload.Upload() = "" Then Response.Write("Success")
GetFileCount()
Returns number of files uploaded. Use this method to check the number of files uploaded and then use GetFileName method to retrieve name of each file.
Return value:
INTEGER - Number of files uploaded as an integer.

Response.Write "Number of files uploaded: " & oUpload.GetFileCount()
GetFileName(Count - Integer)
Use this method to retrieve the filenames of the files being uploaded. This is useful if you want to check for filenames which are offensive in nature or types of files which should not be uploaded. Use GetFileCount() method to see how many files are being uploaded.
Return value:
STRING - Filename of the file being uploaded.

Count - Index of file for which filename is to be retrieved. Use GetFileCount() method to see how many files are being uploaded.

For i = 1 to oUpload.GetFileCount()
Response.Write oUpload.GetFileName(i)
Next
SavePath as String
Full path on local server to save the uploaded files to. This value is set to "c:" by default.

oUpload.SavePath = "c:\inetpub\wwwroot\uploads"
MaximumSize as Integer
Maximum size of file in bytes which can be saved during the Upload method. This value is for each individual file.

oUpload.MaximumSize = 2000000
OverWriteFiles as Boolean
Set this property to TRUE if existing file with same name as the one being uploaded should be overwritten with the new one. This property is set to TRUE by default.

oUpload.OverWriteFiles = TRUE


DynuCOM Version 4.0 - DynuWhois Methods and Properties

DynuWhois Methods and Properties

Dynu.Whois
Whois(Domain - String)
WhoisHTML(Domain - String)
IsAvailable(Domain - String)
SetServer(Domain - String)
SetPort(Port - Integer)
SetAvailableString(AvailableString - String)
SetEndCopyright(EndCopyrightTag - String)
Timeout as Integer
RemoveCopyright as Boolean

- Method [image] - Property

Methods
Whois(Domain - String)
Retrieves Whois information for the domain name passed in as parameter.
Return value:
STRING - Response from whois server as a string.

Domain - Top level domain name whose whois information is to be retrieved as a string.

Response.Write oWhois.Whois("microsoft.com")
WhoisHTML(Domain - String)
Retrieves Whois information for the domain name in HTML friendly format.
Return value:
STRING - Response from whois server in HTML friendly format as a string.

Domain - Top level domain name whose whois information is to be retrieved as a string.

Response.Write oWhois.WhoisHTML("microsoft.com")
IsAvailable(Domain - String)
Checks to see if a domain is available for registration. In order for this to work correctly, the AvailableString property must be set appropriately. This method will look for the AvailableString phrase in the Whois response and will consider the domain available for registration if the AvailableString phrase is found. The AvailableString property is set to 'NO MATCH' by default.
Return value:
TRUE - Domain name is available for registration.
FALSE - Domain name is not available for registration and is already taken by someone else. Use Whois() or WhoisHTML() methods to view details of the present registrant.

Domain - Top level domain name which should be checked for registration eligibility.

If oWhois.IsAvailable("microsoft.com") Then
Response.Write "Domain is available for registration."
Else
Response.Write "Domain is already taken and is not available for registration."
End If
SetServer(Host - String)
Use this property to set the whois server which should be used for query. Whois method can automatically figure out which whois server to use so this method is not required.
Return value:
None
Host - Hostname of whois server which should be used for whois queries.

oWhois.SetServer "whois.networksolutions.com"
SetPort(Port - Integer)
Use this property to set the port on which to communicate with the whois server. The default port used is 43.
Return value:
None
Host - Hostname of whois server which should be used for whois queries.

oWhois.SetPort 43
SetAvailableString(AvailableString - String)
This method is used to set the AvailableString phrase which is looked for in the whois returned to determine if the domain is available for registration or not. This method must be used properly if you wish to use the IsAvailable() method properly.
Return value:
None
AvailableString - Pass in the string to look for to determine if a domain is available or not. The available string for whois.networksolutions.com whois server is 'NO MATCH'. Each whois server has its own unique AvailableString. To find out the AvailableString for a whois server, perform a whois and then look for a unique phrase which is returned when the domain is available for registration.

oWhois.SetAvailableString "This domain is available"
SetEndCopyright(EndCopyrightTag - String)
Use this method to set the EndCopyright tag. If the RemoveCopyright property is set to TRUE then all whois data till such time the EndCopyright tag is found is deleted before display. This allows for a more clean and concise whois result.
Return value:
None
EndCopyrightTag - Pass in the EndCopyright tag as a string.

oWhois.SetEndCopyright "by this policy."
Timeout as Integer
Timeout used for whois queries in seconds. The default timeout is 5 seconds.

oWhois.Timeout = 3
RemoveCopyright as Boolean
TRUE if copyright text is to be removed from the whois response and FALSE if the copyright text is to be kept intact. The default value for RemoveCopyright property is TRUE. Please set EndCopyright correctly for the copyright removal functionality to work correctly.

oWhois.RemoveCopyright = FALSE


DynuCOM Version 3.0 - Installation

Installation
Fresh Install
Dynu.dll must be installed on the server computer where the ASP pages are executed.
  • Copy the file Dynu.dll to c:\winnt\system32 or the corresponding system directory.
  • On the command prompt, type "regsvr32 Dynu.dll" once you are in the directory where Dynu.dll file exists.
  • A pop message should verify that the component has been installed.
    DynuCOM ASP component is now ready to use.

    Re-installation
    Dynu.dll may be re-installed to give possible longer trial period or replacement with a later version.
  • Unregister the old Dynu.dll file by typing "regsvr32 Dynu.dll /unregserver".
  • Reboot the server.
  • Delete the old Dynu.dll file.
  • Copy the new Dynu.dll file in the location of the old Dynu.dll file.
  • Register the new dll by typing "regsvr32 Dynu.dll" on the command prompt in the directory where Dynu.dll is located".
  • Reboot the server. A reboot is nessasary after uninstalling the component to be able to replace it with a newer version of the file.

    Uninstall
  • Unregister the old Dynu.dll file by typing "regsvr32 Dynu.dll /unregserver".
  • Reboot the server.
  • Delete the Dynu.dll file.

    • Copyright © 1997-2002 Dynu Systems, Inc. All rights reserved.


DynuCOM Version 3.0 - Main

Requirements
DynuCOM under Windows NT and Windows 2000 platforms requires the following:

· Operating system Windows NT Server or Windows 2000 or Windows NT Workstation Version 4.0 for INTEL based Systems or higher.
· Network environment with TCP/IP-Protocol

In order to use DynuCOM under Windows 95/98, you need a computer with the following properties:

· Operating system Windows 95/98
· Network environment with TCP/IP-Protocol


DynuCOM Version 3.0 - DynuCreditCard ASP Code

DynuCreditCard Sample ASP Code


DynuCOM Version 3.0 - DynuDateTime ASP Code

DynuDateTime Sample ASP Code


DynuCOM Version 3.0 - DynuDNS ASP Code

DynuDNS Sample ASP Code


DynuCOM Version 3.0 - DynuExec ASP Code

DynuExec Sample ASP Code


DynuCOM Version 3.0 - DynuEmail ASP Code

DynuEmail Sample ASP Code


DynuCOM Version 3.0 - DynuEncrypt ASP Code

DynuEncrypt Sample ASP Code


DynuCOM Version 3.0 - DynuFileUtil ASP Code

DynuFileUtil Sample ASP Code


DynuCOM Version 3.0 - DynuFTP ASP Code

DynuFTP Sample ASP Code


DynuCOM Version 3.0 - DynuHTTP ASP Code

DynuHTTP Sample ASP Code


DynuCOM Version 3.0 - DynuPOP3 ASP Code

DynuPOP3 Sample ASP Code


DynuCOM Version 3.0 - DynuPing ASP Code

DynuPing Sample ASP Code


DynuCOM Version 3.0 - DynuSocket ASP Code

DynuSocket Sample ASP Code


DynuCOM Version 3.0 - DynuStringUtil ASP Code

DynuStringUtil Sample ASP Code


DynuCOM Version 3.0 - DynuUpload ASP Code

DynuUpload Sample ASP Code
DynuUpload1.asp

DynuUpload2.asp


DynuCOM Version 3.0 - DynuWait ASP Code

DynuWait Sample ASP Code


DynuCOM Version 3.0 - DynuWhois ASP Code

DynuWhois Sample ASP Code


DynuCOM Version 3.0 - License and Registration

License and Registration
License for Dynu components are based on per server. Every server Dynu component is installed on requires a separate license. Please note that DynuPing, DynuExec, DynuWait and DynuEmail are free Components(without expiration) which donot require a registration or a license and come with unlimited usage. Components may not be distributed or sold in any manner without our written approval.

Component | 1 Server
DynuCOM | $89.99
DynuFTP | $29.99
DynuHTTP | $29.99
DynuEncrypt | $29.99
DynuTCPSocket | $19.99
DynuWhois | $29.99
DynuPop | $19.99
DynuUpload | $19.99
DynuCreditCard | $19.99
DynuDateTime | $19.99
DynuDNS | $19.99
DynuFile | $19.99
DynuString | $19.99
Custom Built* | $49.99
DynuEmail | Free
DynuExec | Free
DynuPing | Free
DynuWait | Free

*If you need special methods or properties, email us at customize@dynu.com and we will advise if we can do it for you.


DynuCOM Version 3.0 - Frequently Asked Questions

Frequently Asked Questions
  • How can I purchase the full version of the component?
  • I am able to use Dynu ASP component when values are passed in as constants but it fails when I try to use a variable. What is the deal?
  • I ordered an ASP Component but still have not received it yet via email. When should I expect it?
  • I want to buy DynuCOM but I donot want DynuExec and DynuFile in it? How can I disable DynuExec and DynuFile?
  • Is it possible to password protect DynuExec IDL in DynuCOM component?
  • I installed Dynu.dll on my new Windows 2000 Server and I keep getting error 'Server object, ASP 0177 (0x8007045A)'.
  • I get an error when trying to use Dynu ASP Component? Can you help me solve the problem?
  • What programming language is DynuCOM developed in?
  • What is the licensing structure of DynuCOM?

    How can I purchase the full version of the component?
    The full version of Dynu components may be purchased on our secure website at     https://www.dynu.com/products.asp

    I am able to use Dynu ASP component when values are passed in as constants but it fails when I try to use a variable. What is the deal?
    If you have difficulty using a variable in the parameter list for any Dynu ASP Component, please use cstr() around the variable in the parameter list. You can use any variable in the parameter list by using the cstr() function around it.E.g.
    Instead of Dynu.Whois(somevariable), you can use Dynu.Whois(cstr(somevariable)).

    I ordered an ASP Component but still have not received it yet via email. When should I expect it?
    Orders are processed manually to prevent credit card frauds. During busy times of the day, it may take a few hours to process your order and send it to you via email.

    I want to buy DynuCOM but I donot want DynuExec and DynuFile in it? How can I disable DynuExec and DynuFile?
    When placing order to purchase DynuCOM, in the 'notes' field, please specify what IDLs you want to have disabled and you will receive the appropriate dll.

    Is it possible to password protect DynuExec IDL in DynuCOM component?
    We can password protect any IDL in DynuCOM which will make all methods in the given IDL password protected. There is no additional charge for this option. To get this feature, when placing the order, in the 'notes' section, please specify IDLs which need to be password protected. You will receive the password along with the license key.

    I installed Dynu.dll on my new Windows 2000 Server and I keep getting error 'Server object, ASP 0177 (0x8007045A)'.
    This error is caused by overly strict security. Please see     Microsoft Q175804. IIS needs (at minimum read) access to the registry and to the Windows directory where the Dynu DLLs are installed - and of course read access to the directory where Dynu dll is installed. This kind of error is not unusual on Windows 2000 Advanced Server. You need to change the IIS Anonymous user to some user that has appropriate access privileges. In fact you may well find that if you simply switch your IIS virtual directory properties to 'High - Isolated Process' the problem will just solve itself (this will change the user from IUSR_PC to IWAM_PC). You can also use Windows Component Manager to resolve this issue.

    I get an error when trying to use Dynu ASP Component? Can you help me solve the problem?
    We can help you! Please email our technical support staff at support@dynu.com with explanation including Operating System, Service Pack version etc. Please include your ASP file as an attachment with the email since most errors are due to incorrect ASP coding. We will correct any errors and send it back to you ASAP.

    What programming language is DynuCOM developed in?
    DynuCOM is developed on Windows 2000 platform using Microsoft Visual C++.

    What is the licensing structure of DynuCOM?
    Licenses for DynuCOM are based on per server. Each server/machine DynuCOM is installed on requires a separate license. Usage of DynuCOM on multiple servers with same license key will result in it getting disabled permanently on the machine.

    • Copyright © 1997-2002 Dynu Systems, Inc. All rights reserved.


DynuCOM Version 3.0 - Contact

Contact Us
Please feel free to contact us with any questions or comments. We will help you as quickly as possible. Visit our website for updates and news. Any suggestions are welcome and we will try our best to incorporate new features suggested.

Dynu Systems, Inc.
2897 Meadowbrook Dr,
Woodbury,
MN 55125
USA

Email: support@dynu.com
Website: http://www.dynu.com