Round TLRSWP Logo TLRSWP Banner Image
Home
News
Products
Updates
Support
EmailDLL
Manual
FAQ
Debug
DocBox
Contacts
Company
Site Map

EmailDLL Online Manual

home.gif

prev.gif next.gif


Javascript Class Overview

Properties Methods Example


The email100.js file is a Javascript class for use with IntraBuilder. It provides an easy-to-use interface to the DLL that doesn't require you to worry about handles, command key values and other details of the DLL interface. Of course, if you want to interface directly to the DLL , those methods are documented as well.

The first thing you have to do is reference the email100.js file using an #INCLUDE statement. Be sure to place that statement outside of the form class definition. IntraBuilder doesn't support nested class definitions.

To identify itself among the other user sessions that might be creating email messages, the Email class uses the IntraBuilder sessionID value to identify its own email message. Because of this, your forms should have only one email object in memory at a time, and be sure to dispose of it, calling Email.FreeEmail() , when all messages for the form have been transmitted.

So, your form should have a singleton instance of the email class. To initialize the instance, be sure to call the Email.Create() method. You can tell if the email instance is okay to use by either the returned error code , or by testing the Valid property. Anytime a negative value is returned in an error status, you can call the Email.GetErrorString() method for an short American English explanation of the error.

After you've successfully created the email object, you can set the various email message information using the class methods. To set the SMTP mail server address, use the Email.SetServer() method. Set the email message sender with the Email.SetFrom() method. You can set a different address for replies with the Email.SetReplyTo() method.

Many of the standard email header lines are supported directly with methods. For those methods that take email addresses, you can give nicknames and multiple names using the described email address syntax . For the normal recipients (To), the Carbon Copy (CC) recipients, and the Blind Carbon Copy (BCC) recipients, there is a method to clear the list, and a method to add one or more recipients. The methods are:

         To: Email.ClearRecipients() Email.AddRecipient()

         CC: Email.ClearCC() Email.AddCC()

         BCC: Email.ClearBCC() Email.AddBCC()

You can also use non-standard header lines with the Email.ClearOtherHeaders() and Email.AddOtherHeader() methods.

To set the subject of the email message, use the Email.SetSubject() method. Although the SMTP server will add the date/time header line if it finds none, you can also supply a date/time string using the Email.SetDate() method.

To clear the text of the message, use the Email.ClearMessage() method. To add text into the message, use the Email.AddMessageLine() method. You can add one line or a long string of text using that method. If you want to use a signature file, or the message text is store in a file, use the Email.SetMessageFile() method.

Depending on your network's email traffic, you may want to increase the number of attempts made to send an email message, using the Email.SetMaxAttempts() method. When you're ready to transmit the message, use the Email.SendMessage() method. Once you're done, use the Email.FreeEmail() operator to release the object inside the DLL.

You can display a debugging log window with the Email.SetDebugOn() method.

If you have any changes you'd like to see made, please feel free to let me know, and I'll consider them for a future release. See the Support section for information.


home.gif
prev.gif next.gif

 


Copyright 1998, TLR Software Publishing
Questions? Comments? Invective?