If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Stand alone email client for pop3 email

Hi folks. I have been searching for a starting point on trying to figure out how to write my own simple email client for both sending and receiving email through internet pop3 email accounts.

From what I can see so far, MAPI is not going to help me as it requires Echange and or Outlook or something like that. I am not looking to depend on or interact with any other email program. I am basically trying to write my own.

I have been using VB and QB and GWB for years, but I have never wrote anything that involved the internet. They have all be pretty simple programs. I have also been webmastering for a few years now, but once again it has been pretty simple stuff. Mostly just HTML, some CSS, JavaScript, PHP. But, nothing very complicated or hard.

I am hoping that someone can help me figure out how to write VB6 code to both send and receive email through a email (pop3) account. I am not going to guarantee that I am using the correct terminology when I say POP3, so here it is in a nutshell. Assuming that I already have an internet connection, I want to be able to login to an email account that I create with my hosting service using my username and password. Of course, I would also know the incoming mail server address (typically mail.mydomain.com) and my outgoing mail server address (typically smtp.myisp.com).

If you can tell me how to do this, it would be great. If not, if you know where I could find this information, that would be great too.

Here is a class you can use to send email from VB. I wrote it years ago, but have seen a few requests for info on emailing.
Here is an example of how to use the class

Edit: Before using the class you'll have to add a refernce to MSWINSCK.OCX
Goto Project\References Browse to system32\MSWINSOCK.OCX

visual basic code:Option Explicit

Private WithEvents SMTP As clsSMTP

Private Sub Command1_Click()

With SMTP
'who is the email from?
.Sender = "YoMama"
'who is it going to?
.Recipient = "whomever@whereever.net"
'your SMTP server
.SMTPhost = "smtp.myserver.com"
'optional subject line
.Subject = "SMTP test"
'make connection to the server
.OpenMail
'did connection succeed?
If Not .Connected Then Exit Sub
'you can send as many lines as you want here
.Send "Bill,"
.Send "This is a test of your wonderful SMTP client!"
'make sure you close or nothing will get sent
.CloseMail
End With