Home arrow Delphi-Kylix arrow Creating an SMTP Server
DELPHI-KYLIX

Creating an SMTP Server


A POP3 server only does half the job when it comes to email. In this article you will learn how to build an SMTP server.

Author Info:
By: Leidago
Rating: 5 stars5 stars5 stars5 stars5 stars / 35
May 08, 2006
TABLE OF CONTENTS:
  1. · Creating an SMTP Server
  2. · Setting the database connections
  3. · Optional
  4. · The Code
  5. · Conclusion

print this article
SEARCH DEVARTICLES

Creating an SMTP Server
(Page 1 of 5 )


A downloadable file for this article (for purposes of testing) is available here.
A downloadable zip of the source code is also available here.

Introduction

An SMTP Server stores mail messages in an ordered way. The server gets the messages from an SMTP Client. For example, if you create and send a new message from a mail client such as Eudora or Outlook Express, an SMTP Client will carry this message to an SMTP Server associated with the domain in a mail address.

A typical email address consists of a name and domain name i.e., john@whatever.com, so the sending client will transport the message to the receiving server. The server will then store the message, so that a pop3 server can retrieve it later. To summarize, the purpose of an SMTP Server is to store messages received from SMTP Clients. If you want to learn more about pop3 servers, check out my article here; it's a companion piece to this one.

Aims of the Application

Like any communications protocol, the SMTP Server communicates through commands and replies. So in this tutorial we will implement all the commands that are needed to create a fully functional SMTP Server. The following commands are needed:

USERNAME
PASSWORD
MAIL FROM
RCPT TO
DATA

What you need

If you have Delphi 6 and above, then you can skip this section; otherwise go to http://www.indyproject.org/ and download the version appropriate to your Delphi version. I am using Delphi 7 and Indy 10.1.15. There are proper guides available on the indy site that explain how to install Indy on your computer.

Let's get started

Start Delphi, and create a new application. Drop the following components on the form:

Components

From Tab

Rename to:

TidSMTPserver

Indy Server

pops

TidMessage

Indy Misc

mess

TidServerInterceplogfile(optional)

Indy Intercept

logfile

TAdoConncetion

ADO

AdoConnection1

TADOtable

ADO

Ado1

TADOQuery

ADO

q2


blog comments powered by Disqus
DELPHI-KYLIX ARTICLES

- Loading an XML Document into the DOM
- Delphi Wrapper Classes and XML
- Delphi and the DOM
- Delphi and XML
- Internet Access: Client Service
- Finishing the Client for an Internet Access ...
- The Client for an Internet Access Control Ap...
- User Management for an Internet Access Contr...
- Important Procedures for an Internet Access ...
- Server Code for an Internet Access Control A...
- Constructing the Interface for an Internet A...
- Building a Server Application for an Interne...
- Building an Internet Access Control Applicat...
- Client Dataset: Working with Data Packets an...
- Using the Client Dataset in an N-Tiered Appl...

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials