Email Marketing Database Setup

You can setup email marketing database and SMTP configuration just by reading this document, super easy steps!

In this setup guide we focus on three things
  1. MS SQL Database Setup
  2. Email Configuration setup
  3. Email Template Step

Make sure you have changed following information in web.config file, set your database name, user id, password etc.

<add key="ServerName" value="ARINDAM-PC\SQLEXPRESS" />
<add key="DatabaseName" value="WTREmailDB" />
<add key="SchemaName" value="dbo" />
<add key="UserId" value="emailsa" />
<add key="Password" value="emailpass" />
Database Configuration

Now create following two tables in SQL database.

Create a table with name "tbContactList" just by executing the following script.

      CREATE TABLE [dbo].[tbContactList](
	[nt_id] [bigint] IDENTITY(1,1) NOT NULL,
	[fullName] [varchar](500)  NOT NULL,
	[email] [varchar](500) NULL,
	[Organisation] [varchar](500)  NULL,
	[Address] [varchar](500)  NULL,
	[City] [varchar](100)  NULL,
	[lastNotified] [datetime] NULL,
	[followupDate] [datetime] NULL,
	[isActive] [bit] NOT NULL,
	[RefContext] [varchar](500)  NULL,
	[AdminRemark] [varchar](1000)  NULL,
	[Phone] [varchar](200)  NULL,
	[Mobile] [varchar](200)  NULL,
	[Website] [varchar](500)  NULL,
	[lastUpdated] [datetime] NULL,
	[JobTitle] [varchar](100)  NULL,
	[Category] [varchar](250)  NULL,
	[emailStatus] [varchar](500)  NULL,
	[IsValidEmail] [bit] NULL,
	[product] [varchar](50)  NULL,
 CONSTRAINT [PK_tbNewsLetter] PRIMARY KEY CLUSTERED 
(
	[nt_id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] 
Create a table with tbDuplicateData

This table will help to find and keep the record of duplicate emails, so if you want you can delete all the duplicate records from table

CREATE TABLE [dbo].[tbDuplicateData](
	[email_id] [varchar](500)  NULL,
	[CountId] [int] NULL
) ON [PRIMARY]
Email configuration setup

The file contains SMTP and some other configuration related information like email header, footer etc, please change them and set your information.

The below file located at "Configs/B2BSystemSettings.xml"

System configuration file: B2BSystemSettings.xml
<?xml version="1.0" encoding="utf-8" ?>
<B2BSystemSettings>
<ErrorNotification>webtrainingroom@gmail.com</ErrorNotification>
<ErrorSubject>WebTrainingRoom error at Development</ErrorSubject>
<AppTitle>WebTrainingRoom.Com - Web Development and Digital Marketing</AppTitle>
<BusinessPunchLine>
<![CDATA[ WebTrainingRoom.Com - Web Development and Digital Marketing
]]>
</BusinessPunchLine>
<BusinessPunchDetails>
WebTrainingRoom.Com - Web Development and Digital Marketing
</BusinessPunchDetails>
<SmtpServer>01.225.224.336</SmtpServer>
<SmtpUserName>dae0ce4e7b671f883332b78628524ca5</SmtpUserName>
<SmtpPassword>33b0e1b518cc48e3223f294cff9fcaa4</SmtpPassword>
<SMTPPort>25</SMTPPort>
<SmtpEnableSSL>false</SmtpEnableSSL>
<FromEmail>youremail@doamin-name.com</FromEmail>
<ReplyTo>youremail@doamin-name.com</ReplyTo>
<DisplayName>WebTrainingRoom</DisplayName>
<EmailHeader>
<![CDATA[ <div style='background-color:#eee;padding:2px;font-weight:bold;font-size:18px;'>
WebTrainingRoom.Com - Web Development Tutorials
</div>
]]>
</EmailHeader>
<EmailLogo>vdealx@gmail.com</EmailLogo>
<EmailFooter>
<![CDATA[ <div style='background-color:#eee;padding:2px;text-align:right;'>
Developed by <a href='http://webtrainingroom.com' target='_new'>WebTrainingRoom</a>
</div>
]]>
</EmailFooter>
<IsSmtpOn>0</IsSmtpOn>
<IpinfodbKey>fabbc07bebfb02d70de4afca7cbd7ccfc2424b26034149bc765416a570e91f31</IpinfodbKey>
<AdminKey>Q742PO98TG</AdminKey>
   
</B2BSystemSettings>
SMTP Setup

Make sure you change SMTP configuration details correctly

<SmtpServer>01.225.224.336</SmtpServer>
<SmtpUserName>smtp-username</SmtpUserName>
<SmtpPassword>smtp-password</SmtpPassword>
<SMTPPort>25</SMTPPort>
<SmtpEnableSSL>false</SmtpEnableSSL>
<FromEmail>support@webtrainingroom.com</FromEmail>
<ReplyTo>support@webtrainingroom.com</ReplyTo>
<DisplayName>WebTrainingRoom</DisplayName>
Email Template setup

Now this file will contain your email template setup, how you want your email body will look like, with appropriate header and footer etc.

File: MailFormat/newsletter.html
You can design your html template the way you want, but we have following recommendation as for best result

Recommendation:
  • Use simple template, don’t use border in your newsletter.
  • Newsletter should not have more than two hyperlinks, one is the best.
  • Avoid using image in newsletter, or maximum you use one image only if the image source is from secure (ssl) server
  • Keep the content as compact as possible, short message is more effective
  • Don’t use multi colour font to draw attention, actually that look kiddies
  • Avoid promotional subject line, either people will avoid opening just by reading the subject line, or the mail may go in spam / promo folder

Code to Add:
You must add the following code in your html of newsletter.
<div style="margin-top: 10px;"> $[_name]$,</div>
if you are not familiar with SQL development, please check our free sql development tutorial.
 
Email Software Database Setup
A customised email marketing mechanism will allow any small business owner send any number of emails to users with different SMTPs, any can setup any email body, which means if you have your own SMTP server, you don’t need to spend any extra money for email marketing.
eCommerce Development
Recruitment Software
Send Emails with any SMTP
Email Marketing Simplified:

Send Customize eMail to your prospect using your own email marketing software.

Reach customers online with unlimited emails.
Get Customized Application.