Delphi-Kylix
  Home arrow Delphi-Kylix arrow Creating an SMTP Server
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
DELPHI-KYLIX

Creating an SMTP Server
By: Leidago
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 13
    2006-05-08

    Table of Contents:
  • Creating an SMTP Server
  • Setting the database connections
  • Optional
  • The Code
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Creating an SMTP Server


    (Page 1 of 5 )

    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.
    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

    More Delphi-Kylix Articles
    More By Leidago


       · I'd like to see an article that created an SMTP/POP3 proxy so I could writecode to...
       · I will certainly look into it!Thanks
       · This not working for me, I use Delphi7, do i need to use some library to get this...
       · Hello, anybody home
       · I Created Own SMTP server using my airtel broadband connection....i can send emails...
     

    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...







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek