General Notes:

This demo is provided as both interpreted and compiled 4D structures. 
This demo will be somewhat slow if run in interpreted mode.  Compiled,
however, it will be very fast.  This is because of the text parsing
and BLOB manipulation being done in the components.  Usually, you will
only want to use the interpreted version of the demo to see the code. 
To run the demo, though, it is probably best to run compiled for the
dramatic speed increase this will afford.

When starting the interpreted version of the demo, you will encounter
a Debug window.  The TRACE command is placed before any code is run to
allow you to quickly enter the database without having to wait for all
of the startup code to run.  You will also encounter the TRACE command
when quitting the database.  If you aborted the On Startup method, the
components will not be initialized, so you will want to abort the On
Exit method to avoid calling other component methods (this can cause
errors, obviously).



To use the SMTPd_Demo:

Just open the database structure ("SMTPd_demo" for interpreted or
"SMTPd_demo.comp" for compiled) with 4D 6.7.x.  The On Startup method
only initializes the components.  You will need to execute the demo
methods or use the GUI to send email.

To use the GUI in the SMTPd_demo, choose "Send Email..." in the
"SMTPd" menu.  Fill in at least the SMTP Server, From and To email
addresses, and click the "Send" button to send the email.  Other
information, such as SMTP AUTH and Reply-To email address, may be
filled in if you wish to add those features to your demo email.

If you'd like to send email using one of the more complicated methods,
you can use the demo methods.  These methods begin with
"aaa_Demo_Send_".  Open one of these methods, set the variables to the
appropriate values, and then execute the method from the user
environment.



Tour of the SMTPd_demo code:

The On Startup method initializes the components.  The demo code is in
the methods beginning with "aaa_Demo_Send_".  They will appear at the
top of the method listing.  There is a demo method for each type of
email that can be sent with SMTP Deux.

To use one of the demo methods, open it and set the variables (SMTP
Server, email addresses, SMTP AUTH options) to valid information. 
Unfortunately, Deep Sky Technologies, Inc. cannot provide an open demo
account on our email servers without making it very useful to
spammers.  You will need to use information for a valid account that
you already have available.  Keep in mind that most free mail hosting
domains (yahoo.com, etc.) will require SMTP AUTH.  



Troubleshooting:

"How do I use SMTP AUTH?"

Set the variable "$qiUseSMTPAUTH" to one (1).  Also, make sure the
variables "$xUsername" and "$xPassword" have the SMTP AUTH information
required for your account.


"There are errors related to the plugin commands."

4th Dimension installs 4D Pack (formerly ACI Pack) and Internet
Commands into the system Mac4DX/Win4DX folder so that they can be
available to all 4D databases.  The demo includes all necessary
plugins in its own 4DX folder; this includes 4D Pack, Internet
Commands, and Internet ToolKit.  Sometimes, the plugins in the system
4DX folder may cause resource conflicts with the plugins in the demo's
4DX folder.  You can temporarily remove the conflicting plugins from
the system 4DX folder to see if this is causing the problem.
