getting a-mails from server

This is a discussion on getting a-mails from server within the C Programming forums, part of the General Programming Boards category; Hi Is it possible to get e-mails from a Linux server with a CGI program written with C. The server ...

  1. #1
    Just kidding.... fnoyan's Avatar
    Join Date
    Jun 2003
    Location
    Still in the egg
    Posts
    269

    getting a-mails from server

    Hi
    Is it possible to get e-mails from a Linux server with a CGI program written with C. The server gives shell accouts to users and they have to check their a-mail with telnet ( :P ) so I decided to write a CGI program that will make it possible to check the e-mail with a web page. Do you know any library or any example code?

  2. #2
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768
    first of all... everything is possible.

    and to "get" e-mails... it doesn't matter it's a linux server or just a lame ass billy-soft... you address the POP3 server on port 110!

    to do that, you will need to know socket programming or as in windows it's called winsocks... and you will need to learn the POP3 protocol, to be able to work with it.

    So, what you will need to do is:
    1) Find the address of the POP3 server.
    2) Learn socket programming. --> Beej's guide to socket programming - for C/C++
    3) Learn how to work with the POP3 protocol, how to "get" e-mails from it, and like it.


    You have a long way, but it worse it... if you like that SHlT
    Last edited by Devil Panther; 06-22-2003 at 01:11 PM.
    "I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

    http://www.Bloodware.net - Developing free software for the community.

  3. #3
    Registered User
    Join Date
    Jul 2002
    Posts
    913
    you might be able to cheat with some system() calls.

  4. #4
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768
    as you said... CHEAT
    but you can then only use it with *nix systems... since windows doesnt' have any prompt based e-mail programs.
    "I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

    http://www.Bloodware.net - Developing free software for the community.

  5. #5
    Registered User
    Join Date
    Jul 2002
    Posts
    913
    but you can then only use it with *nix systems... since windows doesnt' have any prompt based e-mail programs.
    really? what did they do why back when there was dos?

    if he had to he could try to compile sendmail for windows. other linuxy things have been compiled and worked.

  6. #6
    Registered User
    Join Date
    Jan 2003
    Posts
    88
    Originally posted by mart_man00
    you might be able to cheat with some system() calls.
    thats not going to help teach him sockets now is it? also the POP3 protocol is super duper easy.

  7. #7
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768
    really? what did they do why back when there was dos?
    mart_man00 , are you claiming that DOS came before unix?
    what are you, a Billy lover?



    if he had to he could try to compile sendmail for windows. other linuxy things have been compiled and worked.
    the idea is to make a program, which is not based on "anything", but itself!
    "I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

    http://www.Bloodware.net - Developing free software for the community.

  8. #8
    Me -=SoKrA=-'s Avatar
    Join Date
    Oct 2002
    Location
    Europe
    Posts
    448
    Originally posted by mart_man00
    really? what did they do why back when there was dos?
    Correct me if I'm wrong, but Windows didn't have internet capabilites untill Win95 when Gates realised how much money he could make with it. Before that, MS was against the internet and they thought it would be something that would go away. You did have internet in the Macintosh i think. As Devil Panther pointed out, UNIX came long before MS-DOS did. If you had DOS you did't go on the internet. But then again those where the days when you could finger around without worries. Before spam and the people who are using computers because they see it on tv...
    SoKrA-BTS "Judge not the program I made, but the one I've yet to code"
    I say what I say, I mean what I mean.
    IDE: emacs + make + gcc and proud of it.

  9. #9
    Registered User
    Join Date
    Jul 2002
    Posts
    913
    mart_man00 , are you claiming that DOS came before unix?
    flamefest in no time now.

    dos was around for a while, it was popular for while, dont you think sometime in history some programmer wrote a dam email program for it!

    i threw it in because of this line
    but you can then only use it with *nix systems... since windows doesnt' have any prompt based e-mail programs
    he can do it either way. it will still be a program with a bunch of system calls. granted, he wont learn as much but this kind of stuff takes time. if hes none, if he doesnt think he can pull it off or if he just want to make sure it will work hes better off with the system calls.

    o yeah, i dont remember him saying "the idea is to make a program, which is not based on "anything", but itself!"

  10. #10
    Registered User
    Join Date
    Jul 2002
    Posts
    913
    i missed this.

    Correct me if I'm wrong, but Windows didn't have internet capabilites untill Win95 when Gates realised how much money he could make with it.
    i think your right, but dos was used for awhile there most of been something back then. if not, we have the programs now.

  11. #11
    Registered User
    Join Date
    May 2002
    Posts
    132
    Perhaps I am wrong as well, because it might have just been some sort of update my cousin had gotten a while after win95 was released, but they were using the internet on their win3.1 system. But then again like I said I could be wrong because they were still using win3.1 way into the days of win95.

  12. #12
    Registered User
    Join Date
    Jul 2002
    Posts
    913
    Alittle late tyouk

    Yeah, the internet is old. Before it was really the internet there was still people using it.

  13. #13
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    AFAIK Windows 3.11 was Windows for Workgroups, which did have networking capabilities.
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Server Architecture
    By coder8137 in forum Networking/Device Communication
    Replies: 2
    Last Post: 01-29-2008, 11:21 PM
  2. Where's the EPIPE signal?
    By marc.andrysco in forum Networking/Device Communication
    Replies: 0
    Last Post: 12-23-2006, 08:04 PM
  3. SMTP Server Not Working
    By (TNT) in forum Networking/Device Communication
    Replies: 1
    Last Post: 07-15-2003, 06:33 AM
  4. IE 6 status bar
    By DavidP in forum Tech Board
    Replies: 15
    Last Post: 10-23-2002, 06:31 PM
  5. socket question
    By Unregistered in forum C Programming
    Replies: 3
    Last Post: 07-19-2002, 02:54 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21