SunQuest
 
       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  
Dedicated Servers  
Actuate Whitepapers 
Moblin 
IBM® developerWorks 
Sun Developer Network 
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: 4 stars4 stars4 stars4 stars4 stars / 7
    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

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

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

    DELPHI-KYLIX ARTICLES

    - Client Dataset: Working with Data Packets an...
    - Using the Client Dataset in an N-Tiered Appl...
    - Using the Client Dataset in Two-Tiered Clien...
    - Using the Client Dataset in File-Based Archi...
    - Demystifying the Client Dataset
    - Working with INI Files in Delphi
    - Creating Data Link (UDL) Files in Delphi
    - Looking at the Details for an Invoicing Appl...
    - Invoicing in Delphi: Show Me the Money
    - Saving Images and Binary Files to a Database...
    - Saving Files to a Database using Delphi: Sav...
    - Creating CF Applications and Integrating a S...
    - Using Try and Finally to Help Prevent Memory...
    - The Implementation of an FTP Server
    - FTP Server: The Theory







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway