none
POP3, SSL, and GMAIL in VB.NET

    Question

  • Hello,

    I am trying to figure out how to download emails from a GMail account in a program I am creating for a clinic.  I can send emails quite easily over SMTP, but can not find a way to recieve them (over POP3 or IMAP using SSL).  I need to get the message body and the sender from each email in the inbox.  It also needs to be native and can not use pay-for-use COM's and such.  I am using Visual Basic Express 2010.  Is there possibly a simple mail client program that is open source in VB.NET that I can tear apart? Any assistance will be greatly appreciated.

    Monday, March 05, 2012 5:41 AM

Answers

  • Hi CowboyDiplomacy,

    None of the following are in VB, but it is .Net so that is most of the battle.

    I have tried this Library, but it looks promising and is open source:  http://hpop.sourceforge.net/

    Here are some other links that may provide you some guidance.

    http://www.codeproject.com/Articles/29594/How-to-Access-Emails-Using-the-IMAP-Protocol
    http://www.codeproject.com/Articles/1733/Retrieve-Mail-From-a-POP3-Server-Using-C

    Wednesday, March 07, 2012 1:47 AM
  • Thank you for the input TnTinMN.  I've done research and have decided to switch to C# for this program, and just for this one thing.  I've already spent the day reprogramming it in C#.  I'm using the OpenPop.NET and Mentalis references for the project in C#.  It's working beautifully, and for free.  Here's the website that I'm using as a reference;

    http://www.floresense.com/resc_center/?art=1407

    And just as a note, in case the right person at Microsoft ever see's this post, I would like to express how thoroughly aggravated I am (and several others, based on comments on other sites as I was researching) that this is not natively supported.  It has SMTP, but not POP3? Really? Not even IMAP?  And as far as I can tell, it's been a wide open request since VB4.

    Thank you again though TnTinMN and Shanks Zen.  I definitely know my way around VSE2010, but still have a long way to go.  Don't be surprised if I seek your guidance several time over down the road :).

    Wednesday, March 07, 2012 2:51 AM

All replies

  • Hi CowboyDiplomacy,

    Welcome to the MSDN forum.

    I’m not sure if there is open source software to achieve your goal right now. To connect POP mailbox and get the emails, you may need some add-ins, I’d suggest you check this reference link at CodeProject: http://stackoverflow.com/questions/1063255/how-to-read-emails-in-vb-net-2005

    I hope this will be helpful to your issue.

    Best regards,


    Shanks Zen
    MSDN Community Support | Feedback to us

    Tuesday, March 06, 2012 7:12 AM
  • Thank you for the reply Shanks Zen.

    Is the lack of availability a short-comming to VB?  Would it be easier to achieve this in C# or C++?  And if so, do you know any resources that I can get to or should I repost the question in the C#/C++ sections of the forum?

    Tuesday, March 06, 2012 11:13 PM
  • Hi CowboyDiplomacy,

    None of the following are in VB, but it is .Net so that is most of the battle.

    I have tried this Library, but it looks promising and is open source:  http://hpop.sourceforge.net/

    Here are some other links that may provide you some guidance.

    http://www.codeproject.com/Articles/29594/How-to-Access-Emails-Using-the-IMAP-Protocol
    http://www.codeproject.com/Articles/1733/Retrieve-Mail-From-a-POP3-Server-Using-C

    Wednesday, March 07, 2012 1:47 AM
  • Thank you for the input TnTinMN.  I've done research and have decided to switch to C# for this program, and just for this one thing.  I've already spent the day reprogramming it in C#.  I'm using the OpenPop.NET and Mentalis references for the project in C#.  It's working beautifully, and for free.  Here's the website that I'm using as a reference;

    http://www.floresense.com/resc_center/?art=1407

    And just as a note, in case the right person at Microsoft ever see's this post, I would like to express how thoroughly aggravated I am (and several others, based on comments on other sites as I was researching) that this is not natively supported.  It has SMTP, but not POP3? Really? Not even IMAP?  And as far as I can tell, it's been a wide open request since VB4.

    Thank you again though TnTinMN and Shanks Zen.  I definitely know my way around VSE2010, but still have a long way to go.  Don't be surprised if I seek your guidance several time over down the road :).

    Wednesday, March 07, 2012 2:51 AM
  • Hi CowboyDiplomacy,

    None of the following are in VB, but it is .Net so that is most of the battle.

    I have tried this Library, but it looks promising and is open source:  http://hpop.sourceforge.net/

    Here are some other links that may provide you some guidance.

    http://www.codeproject.com/Articles/29594/How-to-Access-Emails-Using-the-IMAP-Protocol
    http://www.codeproject.com/Articles/1733/Retrieve-Mail-From-a-POP3-Server-Using-C

    http://evry1falls.freevar.com/VBNet/VS2010DataBaseBook/vbnetpop3.html

    There are also some updates made, you can see the codeproject.com version from here (http://www.codeproject.com/Tips/441809/Receiving-response-from-POP3-mail-server)


    http://adonetaccess2003.blogspot.com http://vb6access2003.blogspot.com http://evry1falls.freevar.com

    Sunday, August 19, 2012 1:18 AM
  • Thanks for all the replies. So far I like the code in

    http://www.codeproject.com/Tips/441809/Receiving-response-from-POP3-mail-server


    It works great. Only thing I want is instead of displaying :

    +OK 1 2934
    +OK 1 2978
    +OK 1 3219

    I need to see the email subject in the list box.
    Is this possible to do?


    donsls

    • Proposed as answer by evry1falls Saturday, February 02, 2013 7:37 PM
    Friday, February 01, 2013 8:00 PM
  • Actually I'm still working on that .....

    As soon as I finish I will post the solution of this point, in http://www.codeproject.com/Tips/441809/Receiving-response-from-POP3-mail-server

    And in here of course ...
    I own this Tip in codeproject.com by the way .


    http://adonetaccess2003.blogspot.com http://vb6access2003.blogspot.com http://evry1falls.freevar.com

    Saturday, February 02, 2013 8:33 PM