E2db Server Help File Part 2
Revision 4

Further E2db Server

  1. E2db in action
  2. Advanced E2db
    1. Web forms
    2. Validating form input
    3. Form2Mail scripts
    4. Connection Strings
  3. Have your say about e2db

E2db in action

E2db main screen

You can hide e2db at any time by either selecting Hide Server from the Server menu or clicking on the e2db icon in system tray of the task bar.

E2db in system tray

To restore e2db click the e2db icon again. E2db is the “cog” icon on the left.

To start the server press the play button. If you have Auto Start enabled e2db will automatically start when you open it. If the start button is disabled your evaluation license has expired or is invalid.

You can pause e2db server at any time by pressing the pause button. The server is automatically paused if you open the settings or a major error occurs (e.g. Failure to connect to POP3 account or failure to connect to the database).

Pressing stop will stop the server, then close the server.

When you press pause or stop, e2db may finish what it is doing first to prevent loss of email or corruption of your database.

The LEDs designate activity in the three stages of the e2db process.

Firstly the email icon’s LED will light if e2db is receiving email (Green), or an email is SPAM (yellow) or there is an error (Red).

Next the magnifying glass will light if e2db is processing email (Green) or there is an error processing an email (Red). Don’t worry if it doesn’t look like the LED is ever lighting, the process is very quick. As long as records are being posted to your database it is not a problem.

Finally the computer LED will light when your database is being accessed and a record posted (Green) or there is an error opening or posting to the database (Red).

If any of the LED’s stay Red, e2db will pause the server and if it is hidden automatically restore itself so you can see the problem. A solid red LED indicates the there was a major error. Check e2db’s log for more information about the type of error. If you have log exception error enabled the Windows exception error will also be logged as well as e2db plain English error(s).

The log can be read from e2db’s main screen or by opening the current log file by choosing Open Log from the Server menu. The log file will open in Notepad.

A log file is created for each day that e2db is running. All log files are stored in the Log folder of e2db’s root folder, so you can examine previous days logs.

For an explanation of error messages and possible solutions refer to the troubleshooting section.

Advanced E2db

Having e2db start every time windows starts:

Right click on the e2db icon (cog icon) and select copy.
Right click on the Start button and choose Explore.
This should open Windows Explorer.
Double click the “programs” folder and then double click the “Startup” folder.
Right click in some empty space within the folder and choose “Paste Shortcut”.
Close Explorer. That’s it. Next time you start windows e2db will automatically startup.

How can i manually trigger e2db to check for new web form responses (email)?

Simply press pause and then press play. Every time play is pressed e2db server checks for new web form repsonses.

Web forms

In the Extras folder of your e2db installation are some examples of webpages with web forms. Feel free to use these webpages and adapt them to your needs.

If you need to produce a web form yourself you can either use a text editor like notepad and hand code the HTML or use a WYSIWYG editor like Macromedia Dreamweaver to produce your webpage with web form.

Forms tutorial
http://www.w3schools.com/html/html_forms.asp

HTML Forms Tutorial - Input tag
http://webdesign.about.com/cs/forms/a/aaformstut2.htm

HTML Forms Tutorial
http://webdesign.about.com/cs/forms/a/aaformstut1.htm

Validating form input

If a user enters an unexpected type of information (e.g. Text instead of a number) then e2db would not be able to post that information to your database and would either forward or delete the email depending on how you have e2db setup.

Imagine you have an web form input to allow your user to enter their age. You choose a text input (see appendix 3). If your user entered “24” in to the web form input, e2db would convert those characters to the number 24 before posting the value to your database table.

But what if your user enters some non-numeric characters. E2db will try to convert those characters to a number and fail. This will cause an error and e2db will not be able to post that information to your database table. At which point the email will either be deleted or forwarded depending on the settings in e2db.

To prevent this you have a few options:

  1. Make entering the correct type of information the responsibility of your websites users. i.e. Leave it up it their common sense which inputs require numbers and which text.
  2. Put a description next to each input describing the type of information required e.g. “Please enter only numbers”
  3. Perform input validation when the user presses the submit button before emailing the information submitted and ask the user to re-enter information if it is not correct,

Options 1 & 2 are fine if you don’t mind the odd email that can’t be posted to your database table.

A better option is option 3. All inputs are checked to make sure that the information entered meets a certain criteria e.g. All characters entered are numeric. There are many ways of performing input validation depending on the form2mail script you are using and scripting language it is written in.

It is recommended you talk to whoever created your web form / website to see if they can implement form validation. If you have created the form yourself then the following web link may be of help.

Form Validation tutorials

http://webdesign.about.com/cs/formsvalidation/index.htm

Form2Mail scripts

Included with your e2db installation are examples of form2mail scripts which you can use. If you search on google.com you will find many more. The chances are that your web server will already have a form2mail script installed, which you can use. Ask you hosting company for further information about which form2mail script you have available and how to use it.

Some form2mail scripts use hidden inputs to pass information to the form2mail script, like recipient of the email and email subject. Some form2mail scripts have the recipient and subject hard coded into the script itself.

e.g. <input name="Subject" type="hidden" value="Newsletter">

In the Extras folder of your e2db installation there are some examples of form2mail scripts which you are free to use. Please read each script’s disclaimer/copyright for detailed terms of use.

If your server does not allow the use of scripts then you can always use a form2mail script on someone else’s server. Such services are offered for free by companies like http://www.free-cgi.com

Please ensure whichever form2mail script you use  that is written in a scripting language your server supports. Popular scripting languages are PHP, ASP, Javascript and Perl.

Connection Strings

If you are unfamiliar with connection strings it is best to consult your database development team or network administrator.

If you have created your database yourself but are unsure of how to create a connection string then read on.

Connection strings are a single line of text which describe how to connect to a particular database. They contain information about which driver to use to interact with the database, where the database is located (by physical path or server name) and security information.

Fortunately a connection string can be kept fairly simple.

Here is an example of a connection string for Microsoft Access databases:

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;User Id=admin;Password=password;

The above uses Jet drivers for Access. Replace “\somepath\mydb.mdb” with the path and filename of your database, and “admin” with your username and “password” with your password. If you are not using usernames/passwords you can omit these, for example:

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;

Here is another example of a connection string for Access, this time using ODBC driver instead of Jet drivers:

Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\mydatabase.mdb;Uid=Admin;Pwd=password;

All you need to do is replace “C:\mydatabase.mdb” with the path and filename of your database, and replace “Admin” with your database username and “Password” with your password. If your database is not password protected you omit “Uid=Admin;Pwd=password;”.

Here is an example of a connection string for SQL server:
Driver={SQL Server};Server=Kris1;Database=MyWebsite;Uid=sa;Pwd=password;

The above uses the ODBC. Simply replace “Kris1” with the name of your SQLserver, “MyWebsite” with the name of the database on the server, “sa” with your username and “password” with your password.

Provider=sqloledb;Data Source=Kris1;Initial Catalog=MyWebsite;User    Id=sa;Password=password;

The above uses OLE drivers. Simply replace “Kris1” with the name of your SQLserver, “MyWebsite” with the name of the database on the server, “sa” with your username and “password” with your password.

We have touched on the basic requirements to create a connection string. For further details and examples of connection strings for other ADO databases please visit:

http://www.connectionstrings.com/

Have your say about e2db

We rely on our users to tell us what they like and don’t like about our products. You are the best judge of our products and can offer honest advice to us with regards to improvements we can make.

If you like to make a comment about e2db please do so by emailing feedback@interkonect.com or by posting you comments on our e2db forum: http://www.e2db.interkonect.com/forum

Your comments inform the future development of e2db. We are genuinely interested in your views.

If you would like to tell us what you like or love about e2db please do so, it’s always good to hear how our hard work is appreciated.

Part 1 Setting up e2db server ¦ Part 2 Further e2db server ¦ Part 3 Troubleshooting and Appendices

E2db Server COPYRIGHT 2004 Interkonect Services UK Ltd. All rights reserved.