Thread: Making an Email Server

  1. #1
    Unregistered
    Guest

    Smile Making an Email Server

    How can i make an email server using VC 6.0 ?

  2. #2
    The Artful Lurker Deckard's Avatar
    Join Date
    Jan 2002
    Posts
    633
    This is a long way from "Hello World", so be sure to plan it out. You will want to understand RFC 822 and, should you decide to support MIME, RFC 2045 (and 2046 as well, I believe). These documents will help you understand how email messages and attachments are formatted.

    You will also need to understand TCP sockets as well as SMTP to communicate with other email servers, so that your properly formatted email messages can actually get somewhere. I'm sure a Google search will turn up the specs for SMTP and some TCP socket programming tips.

    After you have read and understood the requirements of the RFCs and other documents, grab a pen and paper. Sit down in your favorite chair with a caffinated beverage of choice and plan out the overall logic. Then you can code, debug, and test :)

    You may also find it worth your time to download an opensource SMTP server and review the code.

    Good luck.
    Jason Deckard

  3. #3
    Registered User Nutshell's Avatar
    Join Date
    Jan 2002
    Posts
    1,020
    Hi,

    What are some sites you would recommend which has open source programs?

    I know planetsourcecode is one...but there aren't any major programs there are there?

  4. #4
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,823

  5. #5
    The Artful Lurker Deckard's Avatar
    Join Date
    Jan 2002
    Posts
    633
    Originally posted by Nutshell
    What are some sites you would recommend which has open source programs?
    Freshmeat is another excellent open source site.
    Jason Deckard

  6. #6

  7. #7
    Unregistered
    Guest

    Re: Making an Email Server

    Originally posted by Unregistered
    How can i make an email server using VC 6.0 ?
    Thanks Jason Deckard i know about socket programming but i want to know that how can i will reach to that smtp server of someone.com like yahoo.com or hotmail.com. how can i know that what is the address of smtp server of hotmail.com or yahoo.com?

    Thanks
    Laeeq

  8. #8
    The Artful Lurker Deckard's Avatar
    Join Date
    Jan 2002
    Posts
    633
    Knowing TCP socket programming will be a big help to you. :) You may want to use gethostbyname() to fill your hostent structure. SMTP traditionally listens on port 25.

    Code:
    #include <netdb.h>
    
    struct hostent *hostaddr;
    extern int h_errno;
    
    hostaddr = gethostbyname( "yahoo.com" );
    if ( !hostaddr )
    {
      /* gethostbyname sets h_errno with the error number */
    }
    Jason Deckard

  9. #9
    Unregistered
    Guest
    Hi ,
    Once again Thanks Jason Deckard it was an addition in my knowledge but , I was sending email on hotmail.com it works only if i will send an email to its email server whoes address is mx10.hotmail.com (a guy who told me but he was unable to answer my question) at port 25 this server recives emails but how can some one know that this is an smtp server for hotmail.com. if you will open connection at hotmail.com on smtp port the connection will never esstablish, unless you will open smtp connection on mx10.hotmail.com server.

    With Best Regards
    Laeeq Hamid

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Simple search engine using maps
    By Rob4226 in forum C++ Programming
    Replies: 16
    Last Post: 05-07-2008, 10:57 PM
  2. Spam Filters. ISP based email is dying.
    By Mario F. in forum A Brief History of Cprogramming.com
    Replies: 14
    Last Post: 03-05-2008, 12:05 PM
  3. server client application - (i really need your help)
    By sarahnetworking in forum C Programming
    Replies: 3
    Last Post: 03-01-2008, 10:54 PM
  4. Server and Client process
    By wise_ron in forum Networking/Device Communication
    Replies: 1
    Last Post: 10-07-2006, 01:11 AM
  5. Visual Studio and FTP Server...
    By Grayson_Peddie in forum Networking/Device Communication
    Replies: 0
    Last Post: 09-03-2003, 12:31 PM