Quantcast
Viewing all articles
Browse latest Browse all 24

How to develop a commercial e-Statement solution in vb6 step by step – Download E-Statement Solution Source Code for Free

Download E-Statement Solution Source Code for Free

You can now Download E-Statement Solution Source Code for Free. This solution was developed through a series of posts on this site. For those who feel/felt a bit lazy to follow the E-Statement Development Series in VB 6 you can now Download the source code plus the database for free. You just need to register and we will send you the download link to your confirmed email address.

Here is a summary on what this series has been about:

  1. Basics of E-statement Solution
  2. Setting up your development environment
  3. System Database and Tables
  4. Modules and Menus
  5. E-statement Login System
  6. Send Mail Using Gmail SMTP Server
  7. E-Statement User Management
  8. E-Statement Client Management
  9. E-Statement SMTP Configuration and Server Pinging
  10. E-Statement Email Configuration Form
  11. E-Statement Email Body and Mailer

How To Run The Source Code

Before running the source code make sure you have VB 6 and SQL Server 2008 r2(Express Version Will Work Fine) installed. Download the source code plus the database

Restore the Microsoft SQL “SmartMail.bak” Database Backup in SQL Server 2008 R2

  • Login to Microsoft SQL Management Studio using your credentials.
Image may be NSFW.
Clik here to view.
SQL Management Studio Login
  • Right Click on Databases -> Restore Database
Image may be NSFW.
Clik here to view.
Restore Microsoft SQL Database
  • On the next Restore Database window – select the From Device option and browse for the “SmartMail.bak”  file
Image may be NSFW.
Clik here to view.
Microsoft SQL Restore Database
  • Click on Add button, browse for the Smartmail.bak file you have downloaded, click Ok when done
Image may be NSFW.
Clik here to view.
www.smarttechdiary.com-Microsoft SQL- Restore Database -Specify Backup File
  • Tick on the restore and click ok to restore the Smart Mail Database
Image may be NSFW.
Clik here to view.
Microsoft SQL Server - Restore Database

Create an ODBC Connection, Make the “SmartMail” Database as Default

  • Go to Control Panel -> Administrative Tools -> Choose ODBC Data Sources (32-bit)
Image may be NSFW.
Clik here to view.
Create ODBC in Windows
  • Under the User DNS click the Add button
Image may be NSFW.
Clik here to view.
Add User DNS ODBC
  •  Select SQL Server database and click finish
  • Type the Name (SmartMail), Description (Database Connection to Smart Mail) and Server (Your SQL Instance name). Click Next
Image may be NSFW.
Clik here to view.
Create ODBC Data Source
  • Provide login credentials to the SQL Server . Choose SQL Authentication option. Type sa for username and the password for sa. Click Next
Image may be NSFW.
Clik here to view.
Create ODBC
  • Change the default database to SmartMail database that we just restored. Click NextImage may be NSFW.
    Clik here to view.
    Create ODBC , Default Database
  • Click Finish and Test Data Source
Image may be NSFW.
Clik here to view.
Create ODBC Test Data Source

Change the modConnection Module

Replace the SmartMail (see line 10) and the myPass variable with your ODBC Name and SQL sa password(see line 1) respectively.

Public Const myPass As String = "saSQLPassword"
'Function to Open a Connection to SQL Through Data Source
Public Function OpenDB() As Boolean
    Dim isOpen      As Boolean
    Dim ANS         As VbMsgBoxResult
    isOpen = False
    On Error GoTo err
    Do Until isOpen = True
      CN.CursorLocation = adUseClient
      CN.Open "SmartMail", "sa", myPass  'SmartMail is the Data Source Name.Change if needed
      isOpen = True
    Loop
    OpenDB = isOpen
    Exit Function
err:
    ANS = MsgBox("Error Number: " & err.Number & vbCrLf & "Description: " & err.Description, _
  vbCritical + vbRetryCancel)
  If ANS = vbCancel Then
    OpenDB = vbCancel
  ElseIf ANS = vbRetry Then
    OpenDB = vbRetry
  End If
End Function

Using the System

Unzip the SmartMailSource.zip to a folder, run the SmartMail project in VB 6

Image may be NSFW.
Clik here to view.
Run Smart Mail in Vb6

Login to the system

On the login screen, choose Admin from the dropdown and login with password ‘a’ without the single quotes. The password for all the other usernames is the same.

Image may be NSFW.
Clik here to view.
login to smart mail e-statement

Main Menu Screen

Once we are logged in to the system we will have the main menu screen.

  1. Manage Users – To Manage System Users
  2. Manage Customer Emails – Manage Customer Details
  3. Application Settings – Manage SMTP Server Settings and Email Body Settings
  4. Send E-Statements – Send Mass E-statements
  5. File – Logout or Exit

User Management

One the Main Menu, click on Manage Users, the following screen will appear.

Image may be NSFW.
Clik here to view.
vb6 user/login management system

  • To Manage and existing username, select the user under the drop down box and you can update the details and click on the update button.
  • To create a new username, fill in the Username , Full name, type a password and confirm. To make the username have admin rights (To Mange Users and Application Settings) check the ‘Make User Administrator’ checkbox and click the ADD button.
  • To disable a user select a user under the drop down box and check the ‘Disable User’ checkbox and click update. The user will not be able to login t the E-Statement System.
  • To Delete a user, select the username you want to delete and click the DELTE button. The username will be completely deleted.

Client Management

Click Manage Customer Emails to manage the customer list. we can ADD,SEARCH,UPDATE and DELETE customers in the system.

Image may be NSFW.
Clik here to view.
Client Management System

  • To search for a username, select the search criteria under the Search By drop down box. We can search by Account Number, Name or Email address of the client. The click on the SEARCH button.
  • To make any changes on the existing clients, search for the client, make the necessary change and then click on the UPDATE button.
  • To add a new client, type the Account No, Client Name and Email then click on the ADD button.
  • To delete a client, search for the client and then click on the DELETE button.

Image may be NSFW.
Clik here to view.
Client Management-Search

 

Setup  SMTP Server

Before we are able to send any emails, we need to configure our SMTP server details. In this E-Statement we are using Google/Gmail SMTP server to send the emails. For more details refer to this article. You can use any other SMTP Server to send the emails. Just set up the SMTP settings according to your SMTP Server settings.

Click on Application Setting on the Main Screen, on the screen that appears click on SMTP button.

Image may be NSFW.
Clik here to view.
E-statement Application Settings

The following screen will appear.

Image may be NSFW.
Clik here to view.
www.smarttechdiary.com-SMTP Server Configuration

Make appropriate changes to the configuration and click on the Save Configuration File button

Server: IP/SMTP Server Name

SMTP Users SSL: True or False

SMPT Authentication: 1 or 0

Username: SMTP Username(Senders email address)

Password: Password for you email

Send Using: We have 3 options in this the one the application uses is cdoSendUsingPort = 2

  • cdoSendUsingPickup (1)
  • cdoSendUsingPort (2)
  • cdoSendUsingExchange (3)

Ping SMTP Server and Send a Test Mail

You can click on the Ping button to see if your SMTP Server is reachable. Send a test mail to see if the SMTP Server settings a working correctly.

Image may be NSFW.
Clik here to view.
WWW.SMARTTECHDIARY.COM

 

Setup Email Body and Advert

We can configure 3 main parts of the email under this section.

  • Email Subject – Subject of the Email
  • Header Logo – Company header logo
  • Advert Image – Advert image/ Promotions
Image may be NSFW.
Clik here to view.
Email Body Configuration

Company Header Logo

This section will hold the company logo. The company logo can be changed by providing a different logo using this configuration form.

Logo Format = PNG

Width = 632

Height =  57

Note: The size of your logo should be the same

Sample Logo

Image may be NSFW.
Clik here to view.
HeaderLogo

Company Adverts Section

The advert section is provisioned to add adverts as part of the email body. It is inform of an image.

 

Advert Format = PNG

Width = 566

Height = 223

Note: The size of your advert should be the same

Sample Advert Image

Image may be NSFW.
Clik here to view.
Advert

Prepare your PDFs Statements

The E-Statements will be sent inform of a PDF file. Note that the PDF of a client should be named as the exact account number of the client. When the system pick a PDF from  a folder it will use the PDF name to query for the client details in the clients table. It will pick the client name and email address and then send the PDF Statement as an attachment to the clients email address. Once the PDF has been sent, it will be moved to the sent item folder which will be created by the system.

The screen short below shows the PDF name should be = Account Number

Image may be NSFW.
Clik here to view.
Prepare PDF statements

Once we have our PDFs Statements ready we can begin sending them using the E-Statement solution.

Send E-statements

Depending on your network speed and place of work, you need to consult with the network administrator to see how many E-Statements you can fire out for a particular period of time. For example you can send 500 E-statement Batch during pick hours and 1000 statements batches during off pick hours.

Send E-statements

To send batches create a folder and put your PDFs inside that you want to send. Login to the system. On the main menu click on the Send E-Statements and the following window will appear.

Browse for the folder where the PDFs statements are located and double click it , so that the folder icon look like opened.

Image may be NSFW.
Clik here to view.
E-statement solution

Click on the Start Sending button and let the system send the E-Statements automatically. The time taken to send the E-statements will depend on various factors like:

  • PDFs Size
  • Number of PDFS in a Batch
  • Network speed
  • Computer speed
Image may be NSFW.
Clik here to view.
E-statement sent items
Well I think we have come to the end of this long post. I hope you enjoyed and have fun with the code. please don’t use it to spam people with 1000s of mails Image may be NSFW.
Clik here to view.
:)
Incase you have any question suggestions contact me. You can also comment below.

The post How to develop a commercial e-Statement solution in vb6 step by step – Download E-Statement Solution Source Code for Free appeared first on Smart Tech Diary.


Viewing all articles
Browse latest Browse all 24

Trending Articles