Results 1 to 18 of 18

Thread: VB6.0 - Mail Retrieval

  1. #1

    Thread Starter
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    VB6.0 - Mail Retrieval

    Hi,

    This example show how easy it is to send an email using smtp in this case via the We Only Do smtp component. Also, attached is the rewrite of my VB6.0 - Office Outlook mail retrieval program.

    vb Code:
    1. Dim WithEvents smtp As wodSmtpCom
    2. Private Sub Form_Load()
    3. Set smtp = New wodSmtpCom
    4.  
    5. smtp.HostName = "smtp.gmail.com"
    6. smtp.Security = SecurityImplicit
    7. smtp.Login = "your email"
    8. smtp.Password = "your password"
    9. smtp.Authentication = AuthLogin
    10. smtp.Blocking = True
    11.  
    12. On Error Resume Next
    13.  
    14. smtp.Connect
    15. smtp.Message.Attach "Attachment"
    16. smtp.Message.Attach "Attachment"
    17. smtp.Message.From = "your email"
    18. smtp.Message.To = "to email"
    19.  
    20. smtp.Message.Subject = "test"
    21. smtp.Message.Text = "testing"
    22.  
    23. smtp.SendMessage
    24.  
    25. smtp.Disconnect
    26. End Sub
    27.  
    28. Private Sub smtp_Disconnected(ByVal ErrorCode As Long, ByVal ErrorText As String)
    29.     Debug.Print "Disconnected: " & ErrorText
    30.     If ErrorCode <> 0 Then
    31.         Debug.Print smtp.Transcript
    32.         End If
    33. End Sub
    34.  
    35. Private Sub smtp_Done(ByVal ErrorCode As Long, ByVal ErrorText As String)
    36. If ErrorCode <> 0 Then
    37.     Debug.Print "Done Event: " & ErrorText
    38.     Else
    39.     Debug.Print "E-mail sent!"
    40.     End If
    41. End Sub

    Edit:

    The attachment contains both the code for smtp and pop functionality.

    Other samples are available from the WeOnlyDo site.

    Note: You need to download the Smtp component in order to use the example.


    Nightwalker
    Attached Files Attached Files
    Last edited by Nightwalker83; Dec 8th, 2011 at 06:04 PM. Reason: Adding more!
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  2. #2
    Member
    Join Date
    Aug 2002
    Posts
    58

    Re: VB6.0 - Mail Retrieval

    ya looks like it is a $229 component though. that isn't going to work.
    -------------------------------
    StupidMonkee

  3. #3
    Hyperactive Member
    Join Date
    Jun 2002
    Posts
    352

    Re: VB6.0 - Mail Retrieval

    I'd pay for a single developer license, but thats pretty steep for one app i'm gonna write for personal use, once.

    Surely someone has the talents and an encryption algo compatible with the current ssl version... No one will make one us old timer vb6 addicts can afford?


  4. #4

    Thread Starter
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: VB6.0 - Mail Retrieval

    Quote Originally Posted by easymoney View Post
    I'd pay for a single developer license, but thats pretty steep for one app i'm gonna write for personal use, once.

    Surely someone has the talents and an encryption algo compatible with the current ssl version... No one will make one us old timer vb6 addicts can afford?

    I wish thry would release individual components cheaper too. I doubt anyone not working for a company would be able to afford those prices.
    Last edited by Nightwalker83; Dec 5th, 2011 at 06:19 PM. Reason: Fixed spelling!
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  5. #5
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: VB6.0 - Mail Retrieval

    There isn't a "current" version of SSL/TLS anyway. Your client must negotiate with the server, which usually means supporting several forms. You can see this if you browse the SSL samples (written in C) in the Windows SDK for Vista or later.

    Note that even those samples do not implement SSL "generically" but rely on IPSec which needs to be set up at both ends. So the Winsock secure socket extensions introduced in Vista aren't a general solution for SSL (and they don't work with a VB6 Winsock control anyway).

  6. #6
    Hyperactive Member
    Join Date
    Jun 2002
    Posts
    352

    Re: VB6.0 - Mail Retrieval

    Quote Originally Posted by martind1 View Post
    ya looks like it is a $229 component though. that isn't going to work.
    The SMTP is actually send mail, not mail retrevial... Need Pop3.

    The vendor charges $99 for each component, so POP3 opr SMTP would be $99 each.

    So not quite $229..

  7. #7
    Hyperactive Member
    Join Date
    Jun 2002
    Posts
    352

    Re: VB6.0 - Mail Retrieval

    Quote Originally Posted by dilettante View Post
    There isn't a "current" version of SSL/TLS anyway. Your client must negotiate with the server, which usually means supporting several forms. You can see this if you browse the SSL samples (written in C) in the Windows SDK for Vista or later.

    Note that even those samples do not implement SSL "generically" but rely on IPSec which needs to be set up at both ends. So the Winsock secure socket extensions introduced in Vista aren't a general solution for SSL (and they don't work with a VB6 Winsock control anyway).
    Not sure how this is relevant. It does work on XP... Haven't tested on Vista or Win7, but this component doesn't require winsock reference regardless.

    I have some legacy apps that require XP, and thats not going to change soon. So for XP clients I can say so far, so good.

    Has anyone tested it on Vista (sorry Vista is against my ethical standards, don't, can't and won't use it) or higher? Could test on Win 7, but hoped someone who actually tested the demo can say yes or no to that option...
    Last edited by easymoney; Dec 8th, 2011 at 01:45 PM.

  8. #8
    Hyperactive Member
    Join Date
    Jun 2002
    Posts
    352

    Re: VB6.0 - Mail Retrieval

    I have seen reports that component supports vistaas well as 7... so anyone else care to confirm?
    Last edited by easymoney; Dec 8th, 2011 at 01:53 PM.

  9. #9

    Thread Starter
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: VB6.0 - Mail Retrieval

    Quote Originally Posted by easymoney View Post
    Not sure how this is relevant. It does work on XP... Haven't tested on Vista or Win7, but this component doesn't require winsock reference regardless.

    I have some legacy apps that require XP, and thats not going to change soon. So for XP clients I can say so far, so good.

    Has anyone tested it on Vista (sorry Vista is against my ethical standards, don't, can't and won't use it) or higher? Could test on Win 7, but hoped someone who actually tested the demo can say yes or no to that option...
    Which component are you talking about, the components I linked to above? If so yes, they do work in Windows 7 and Vista, I have tested them on both operating systems. Also, the above attached project should include the code for both pop and smtp if not I will atttach one that does.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  10. #10
    Hyperactive Member
    Join Date
    Jun 2002
    Posts
    352

    Re: VB6.0 - Mail Retrieval

    Quote Originally Posted by Nightwalker83 View Post
    Which component are you talking about, the components I linked to above? If so yes, they do work in Windows 7 and Vista, I have tested them on both operating systems. Also, the above attached project should include the code for both pop and smtp if not I will atttach one that does.
    Ok. I see. post was titled Mail Retrieval, but your example example was only for smtp side and the post example talked of smtp, but the attachment says Mail Version x.x etc, thats where I was not seeing the link to the POP side...

    So really the attachment and example cover both smtp and pop. I will check out attachment. Sorry for the confusion...
    Last edited by easymoney; Dec 8th, 2011 at 05:08 PM.

  11. #11

    Thread Starter
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: VB6.0 - Mail Retrieval

    Quote Originally Posted by easymoney View Post
    So really the attachment and example cover both smtp and pop. I will check out attachment. Sorry for the confusion...
    Nah, it was my fault! I should add a note to the first post explaining that the attachment contains the full code.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  12. #12
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: VB6.0 - Mail Retrieval

    Quote Originally Posted by easymoney View Post
    Not sure how this is relevant.
    Sorry, I thought you were getting at "Why doesn't somebody write one in VB6 using Winsock?"

    I was trying to say the secure POP3 options make this tough and an arms race as SSL options grow with time. Most of the "SSL in pure VB6" code I have seen only supports one of the many possible flavors of SSL out there.

  13. #13
    Hyperactive Member
    Join Date
    Jun 2002
    Posts
    352

    Re: VB6.0 - Mail Retrieval

    Quote Originally Posted by dilettante View Post
    Sorry, I thought you were getting at "Why doesn't somebody write one in VB6 using Winsock?"

    I was trying to say the secure POP3 options make this tough and an arms race as SSL options grow with time. Most of the "SSL in pure VB6" code I have seen only supports one of the many possible flavors of SSL out there.
    Yes. That has been a "paranoid" concern of mine, among overthings... Thanks for reminding me they are really are out to get me... lol. Jk.

    Just having a good afternoon, thanks for the reminder about the always changing flavors of SSL and TLS...TGIF It's worth noting so others may take notice if they decide to pursue these types of projects

  14. #14
    Hyperactive Member
    Join Date
    Jun 2002
    Posts
    352

    Re: VB6.0 - Mail Retrieval

    Quote Originally Posted by Nightwalker83 View Post
    Nah, it was my fault! I should add a note to the first post explaining that the attachment contains the full code.
    We'll your example along with the pop3 conrol help file showed enough with an hour or so I had it connecting and procesing emails using ssl and correct port for gmail. Going to do real test today and test on multiple clients/configs.

    Thanks for your share...

  15. #15
    Frenzied Member
    Join Date
    Nov 2010
    Posts
    1,470

    Re: VB6.0 - Mail Retrieval

    I 've got a DOS exe that works CLI so I can call it from any language on any pc.os

    here to talk

  16. #16

    Thread Starter
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: VB6.0 - Mail Retrieval

    Quote Originally Posted by incidentals View Post
    I 've got a DOS exe that works CLI so I can call it from any language on any pc.os

    here to talk
    If you have the source code for it you can make your own topic and post it instead of hijacking someone elses and saiding the existing topic off topic.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  17. #17
    Lively Member
    Join Date
    Feb 2012
    Posts
    106

    Re: VB6.0 - Mail Retrieval

    Hello,
    Is this working with SSL authentication like gmail?

  18. #18

    Thread Starter
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: VB6.0 - Mail Retrieval

    Quote Originally Posted by green.pitch View Post
    Hello,
    Is this working with SSL authentication like gmail?
    Yes, it can connect to Gmail although, I'm not sure which technology is being used since it uses a third-party dll as stated in the first post.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width