Sign in to follow this  
ytaipsw

email program

Recommended Posts

Hey I'm not quite sure how to do this but I know it involves HTTP. I want to write several applications that involve doing things that I can do with my browser. I want to write useful applications that do things for me. Like a program that checks my email. I'm coding with C++ and I can't find a good place to learn how to do this. I wrote a program using SMTP but I want my application to be useful to other people that don't understand technology very well. SMTP isn't useful to me because many ISP's (or whatever) block port 25. My solution to this was to do it the same way that firefox does; by using HTTP and some other protocol. How would i go about doing this. Thanks -Ytaipsw [Edited by - ytaipsw on September 20, 2008 1:09:57 PM]

Share this post


Link to post
Share on other sites
Quote:
I wrote a program using SMTP… SMTP isn't useful to me because many ISP's (or whatever) block port 25.
First, let’s be a bit more technical in our descriptions. You are writing an e-mail client, right? It needs to support either POP3 or IMAP, and preferably both, for retrieving e-mails, as you should know. And SMTP for sending a mail from your client.

Now, port 25 applies to the mail server. That is, if the mail server has chosen to listen on the default SMTP port, and is actually listening. Are you telling me that ISPs block sending of e-mails?

Quote:
My solution to this was to do it the same way that firefox does; by using HTTP and some other protocol.
What are you even talking about? Firefox is a browser. It is not concerned about e-mail at all. That a website displays an interface to a mailbox is all nice, but Firefox has no concern over the contents of a webpage. That the website display e-mails or an advertisement is irrelevant. Do you understand what a web browser is?

Share this post


Link to post
Share on other sites
It is very common practice for ISPs to block port 25 to all servers except their own mailservers, on their subscriber networks. One part basic network security, one part witless policy.

To the OP: no, you cannot build cars out of roads, much less applications out of protocols. And you yourself don't seem to "understand technology" yet.

So, what I suggest is you read up on client/server networking, learn Python, and use the Twisted networking library to get started making any server applications and testbeds you'll need to develop your own Firefox extension.

Good luck.

Share this post


Link to post
Share on other sites
So, in part of your question are you asking if you can write a C++ program and have a browser use it?

If so the answer is, yes.

But, let us know if this is what you are after before I go into depth. :)

Share this post


Link to post
Share on other sites
ok, i know what i said sounded dumb, but im trying to describe something i don't understand

lemme try to explain this better
i want to write a program with c++ that checks my email every once in a while and if i have a new message, i want it to alert me

i know how to write applications that use TCP/IP and sockets
but i don't know how to communicate with the email server
i don't know which protocols to use to communicate with the email server
and i don't know the syntax of the protocols
(does that make sense?)

what i was saying about my browser is that, i want my program to retrieve my email the same way that my browser allows me to check my email

i want my program to communicate with the email server the same way that firefox does, because firefox will let me use my email on any computer as opposed to the program i wrote that just uses SMTP to send emails, which only works on some computers

oler1s said use IMAP and POP3
are there any other protocols i should understand?
are there any tutorials or resources you know of that would help me learn this stuff?

am i communicating clearly?

i'm sorry that i am confusing

thank you for replying
-ytaipsw

Share this post


Link to post
Share on other sites
Ytaipsw, have you read the Wikipedia entries and Googled the various protocols? You need to do so. I’ll give you a brief explanation.

Quote:
but i don't know how to communicate with the email server
As I mentioned, protocols. Three are in use: SMTP, POP3, and IMAP.

Quote:
and i don't know the syntax of the protocols
Specified the RFCs and generally by Googling for explanations for the protocols. But, you need to be able to go through the RFC. Or, you can look for third party libraries that support the protocols. Honestly, this is why I wouldn’t use C++. Python and Perl are better suited for what you want to do. But, hey, if you want to write a client in C++, be my guest.

Quote:
i want my program to communicate with the email server the same way that firefox does
Firefox does not communicate with the e-mail server. Firefox is a web browser. Look at gmail.google.com for instance. It is a website. This website is designed to let you interact with your e-mail. Let’s say I myself had an e-mail server at example.com . Now, you want to use Firefox to check your e-mail. If I did not have a website interface to your e-mail, Firefox would do nothing. It’s not an e-mail client. It’s an HTTP client. Do you get that?

I realize you want to program something, but you don’t even understand the basic of e-mail. Firefox doesn’t let you check your e-mail. It lets you go to a website. HTTP website. If my website allows you to interact with your e-mail, that’s what you get. If it allows you to trade stocks, that’s what you get. If it allows you to see advertisements for certain enhancements, that’s what you get. Do you understand this fundamental concept?


Share this post


Link to post
Share on other sites
well maybe i don't understand
can you explain to me what happens when i open firefox, log into my email and send a message?

and you said that perl and python are better suited for what i want to do
i wasn't planning on learning either of those
but i was planning on learning Ruby
do you know if Ruby would work for what i'm trying to do?

thanks

Share this post


Link to post
Share on other sites
Quote:
well maybe i don't understand
can you explain to me what happens when i open firefox, log into my email and send a message?


Firefox sends a page request to whatever server hosts your e-mail, and the server sends Firefox a page that looks like an e-mail program. Firefox never has any clue that the pages it is displaying are in fact part of an e-mail system. It works much like the PM feature of this website, just much more sophisticated. Sending a message is mostly just submitting a form, or some other such mundane website-based method of transfer.

However, Yahoo mail, and probably other providers, allows you to use a regular POP3 e-mail client, and your program could probably pose as one of these programs and get your mail even if it is web-based.

Ruby should do fine. The point is that you want a nice, high-level language for something like this.

Share this post


Link to post
Share on other sites
ok.... i did understand

i thought ruby was an interpreted language
doesn't that mean i can't make an exe
i need my program to be an executable

is it difficult to retrieve mail with c++?
i sent mail with C++ and it wasn't difficult

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this