Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

How to Receive Emails From A POP3 Server (VB.NET)

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
1,817
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Aug 30, 2011

How to receive emails from a POP3 server in VB.NET. You will need the POP3.vb class to access the POP3 functions, which is available from the programs section of my website: http://ah33t3r.webs.com/

The code for the program is: If TxtServer.Text = Nothing Or TxtUsername.Text = Nothing Or TxtPassword.Text = Nothing Then MsgBox("One or more of the required boxes have not been filled out", vbInformation, "Box Empty") Else Dim POPConnection As New POP3 Dim MailMessage As New EmailMessage Dim MailCount As Integer Dim MContent As String Dim MFrom As String Dim MSubject As String Dim MTo As String Dim MBody As String POPConnection.POPConnect(TxtServer.Text, TxtUsername.Text, TxtPassword.Text) MailCount = POPConnection.GetMailStat() For i = 1 To MailCount MContent = POPConnection.GetMailMessage(i) MFrom = MailMessage.ParseEmail(MContent, "From:") MSubject = MailMessage.ParseEmail(MContent, "Subject:") MTo = MailMessage.ParseEmail(MContent, "To:") MBody = MailMessage.ParseBody() MsgBox(MSubject & " - " & MFrom & " - " & MTo) Next End If

Be sure to visit my site at http://ah33t3r.webs.com

EDIT: Here's the instructions on how to use Gmail with this:

For Gmail, put in the following information:

Server: pop.gmail.com (im not sure if it will work yet because Gmail needs SSL)

Username: full email address (eg. example@gmail.com)

Password: your Gmail password

If you need more info look at this Gmail help page: http://mail.google.com/support/bin/answer.py?answer=13287

EDIT 2: I may not be making a part 2 of this after all, because now that school has started, I don't have a whole lot of time to make long videos like this. I will try to get a part 2 done sometime, but I just don't know if I'll have the time. I can still make shorter videos though.

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (megalegend57)

  • I have used hotmail:

    pop3.live.com, Port 995

    and it freezes then says "POP3 ERROR- Unexpected response from mail server when connecting"

  • @curlyfries0511 Ok I will try to find out what's wrong with it. Have you looked at this info needed to connect to Hotmail with POP3: h()ttp://lifehacker.()com/5151­551/hotmail-enables-pop3-for-u­s-users (remove the ()'s)

  • @hylandsjgcn I have added instructions to the description for how to use Gmail with this

see all

All Comments (6)

Sign In or Sign Up now to post a comment!
  • Ok so in the POP3.vb there is a line of text reading "TCP.Connect(strServer,110)"<S­erver Port) try changing the server Port to see if that changes anything and not just in Your main form but in the POP3.vb too

  • Hi I can pass the file "POP3.vb" to my email, since I can not access your website, my email is rontrio_08@hotmail.com

  • what do i put in server for gmail

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more