I already know how to send emails using smtp with gmail and I need to know how to reveive emails. Can anybody help?
Printable View
I already know how to send emails using smtp with gmail and I need to know how to reveive emails. Can anybody help?
You don't receive emails with SMTP. SMTP is specifically a protocol for sending email. The most common protocol for receiving email is POP3. Have you ever setup an email client on your own machine? You have to supply an SMTP (Simple Mail Transfer Protocol) server so you can send email to other people and you also have to supply a POP3 (Post Office Protocol) server so you can receive email form other people.
The .NET Framework provides inbuilt functionality to send email via SMTP because it is a very common thing to want an application to send email for notification purposes, support requests, etc. etc.
The .NET Framework does NOT provide inbuilt functionality to receive email via POP3 because it is very UNcommon to want an application to receive email. Everyone has an email client to receive and read email so the need for us to write applications to receive email is essentially non-existent. As such, if you really want to write your own app to receive email then you're going to have to either write your own code to implement the POP3 protocol using low-level objects like Sockets, or else buy a component that has already done that for you.
is there an example how to receive that email via sockets programming ?
i've seen one in C#, but i need a VB2008 code.
even i could convert that language, but perhaps i can see another code to do the same task.. and of course not wasting my time :D
hey, i've found somebody post here http://www.vbforums.com/showthread.php?t=567365
in codeproject the author says that the source code include a dll, but i think the dll is in the source code too..
Thats not true. The most common method of receiving emails is through SMTP... Yes you might use POP3 (or IMAP or whatever) from a PC to view the emails but the actual email delivery to the server happens through SMTP. POP3 is simply downloading the emails from a server that has already received the emails. If that was not the case then we wouldnt have to allow port 25 (SMTP port) through all of our firewalls for emails to be able to be delivered to us.
So I suppose it depends on whether or not the OP wants to just create a program that can view/download messages from a server that has already received the message, or if they want to create an actual server that can accept raw SMTP messages and store them in some kind of mailbox structure.
0 email (CLIENTS) use SMTP to request email.
it's a protocol intended only for electronic e-mail servers and mail transferring agents.
E-Mail clients do not receive e-mails with SMTP, they request it from an e-mail server using a request type protocol.
additionally a quick google search revealed : http://www.a1vbcode.com/snippet-3383.asp
I know, thats exactly what I said. If the OP wants to just make a mail client that downloads mails from a server then fine, use POP3 or IMAP. If they want to make something that actually receives email messages from other servers via SMTP (which is what the title of the thread implies to me, but may or may not be what they actually want) then they need to create their own SMTP server.
Quote:
So I suppose it depends on whether or not the OP wants to just create a program that can view/download messages from a server that has already received the message, or if they want to create an actual server that can accept raw SMTP messages and store them in some kind of mailbox structure.
I'm trying to put something together for an example of this (having some problems at the moment though, see http://www.vbforums.com/showthread.php?t=580413). If/when I get it finished I will post a class in the Codebank section of these forums that can be used to host an SMTP server in your application, which you could use to build your own mailbox/email server structure around.