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:
Dim WithEvents smtp As wodSmtpCom
Private Sub Form_Load()
Set smtp = New wodSmtpCom
smtp.HostName = "smtp.gmail.com"
smtp.Security = SecurityImplicit
smtp.Login = "your email"
smtp.Password = "your password"
smtp.Authentication = AuthLogin
smtp.Blocking = True
On Error Resume Next
smtp.Connect
smtp.Message.Attach "Attachment"
smtp.Message.Attach "Attachment"
smtp.Message.From = "your email"
smtp.Message.To = "to email"
smtp.Message.Subject = "test"
smtp.Message.Text = "testing"
smtp.SendMessage
smtp.Disconnect
End Sub
Private Sub smtp_Disconnected(ByVal ErrorCode As Long, ByVal ErrorText As String)
Debug.Print "Disconnected: " & ErrorText
If ErrorCode <> 0 Then
Debug.Print smtp.Transcript
End If
End Sub
Private Sub smtp_Done(ByVal ErrorCode As Long, ByVal ErrorText As String)
If ErrorCode <> 0 Then
Debug.Print "Done Event: " & ErrorText
Else
Debug.Print "E-mail sent!"
End If
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
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
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'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
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).
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.
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
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.
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
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.
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
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.
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
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