|
-
Oct 15th, 2010, 05:45 PM
#1
Thread Starter
Hyperactive Member
VB6 Winsock SMTP-SSL
Hello,
Can anyone tell me please how to make a mail client that can connect to gmail ? or hotmail ?
I know i need SSL connection, but am not able to find a code or tutorial that teach me how to do this !
I know how to send a mail through winsock on port 25 and 587 with normal authentification (base64), but I don't know how to integrate SSL ?
anyone of you did this before ? can provide a code or tutorial ?
thanks to you guys in advance
-
Oct 15th, 2010, 05:47 PM
#2
Thread Starter
Hyperactive Member
Re: VB6 Winsock SMTP-SSL
Just want to mention that I am looking for a Free solution not to buy a dll, it's not a project to sell or whatever it's for personal use and to learn how
-
Oct 15th, 2010, 06:03 PM
#3
Re: VB6 Winsock SMTP-SSL
There's a SSL mail client on pscode.com that works fine with hotmail.
http://www.planet-source-code.com/vb...71899&lngWId=1
-
Oct 15th, 2010, 06:08 PM
#4
Re: VB6 Winsock SMTP-SSL
Or just use the built in CDO for Windows library.
-
Oct 15th, 2010, 06:10 PM
#5
Thread Starter
Hyperactive Member
Re: VB6 Winsock SMTP-SSL
Thanks Chris001, it was the only example that I could find, but i found it somehow complicated to understand, that's why i posted here to know if there is a kind of tutorial, instead of reading all this code on pscode
anyway if there is no other solution, i will start reading and trying to understand this one
-
Oct 15th, 2010, 06:21 PM
#6
Thread Starter
Hyperactive Member
Re: VB6 Winsock SMTP-SSL
dilettante, your solution means we should have outlook in the computer ? or a specific dll ? ocx etc... ??
-
Oct 15th, 2010, 10:35 PM
#7
Re: VB6 Winsock SMTP-SSL
CDO does not require outlook or any other mail client, some version of CDO is installed with most nt based windows operating systems (can be downloaded for win 9x), but it is only good to send email, not receive
i posted code (tested) for gmail and gmx servers, in a thread, a couple of days ago, it can also work with any default smtp server set for an existing email client
ssl is complicated, that is why many have to resort to purchasing dll or similar, if they want to receive emails from ssl pop server
if you can make that work, please post the code here as many are looking
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Oct 15th, 2010, 11:47 PM
#8
Re: VB6 Winsock SMTP-SSL
You might like to download the source to Whatsup's Email Sender it uses smtp/ssl connects and What's has included the connection info such as post for gmail and hotmail in a text file.
Edit:
If you don't mind using a third-party control checkout the current version of my VB6.0 - Mail Retrieval program.
Last edited by Nightwalker83; Oct 15th, 2010 at 11:52 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
-
Oct 16th, 2010, 05:39 AM
#9
Thread Starter
Hyperactive Member
Re: VB6 Winsock SMTP-SSL
Thanks Nightwalker83, i will check the links you provided and keep you informed if it fits me.
By the way, the one posted on pscode,is not working on gmail ! I tried it with hotmail it works, but in gmail it doesn't, so it makes no sens for me to study it's code , i will see the one you provided Nightwalker83, thanks
-
Oct 16th, 2010, 05:46 AM
#10
Thread Starter
Hyperactive Member
Re: VB6 Winsock SMTP-SSL
It seems that you link you gave me is based on the code of pscode ! It's not working with gmail neither with Yahoo ! I tried many times on port 465 smtp.gmail.com and 465 plus.smtp.mail.yahoo.com, i am sure I entered correctly the username and password, but I am getting the error : Time Out !
By the way, on the one of pscode, I don't even get a timeout the program just freeze maybe waiting for winsock to connect, so the version you passed seems an improved version of pscode, but still didn't work with gmail neither yahoo !
with hotmail, it works fine
Last edited by justgreat; Oct 16th, 2010 at 05:55 AM.
-
Oct 16th, 2010, 05:48 AM
#11
Thread Starter
Hyperactive Member
Re: VB6 Winsock SMTP-SSL
The second choice you gave me, is a payed component, it's not my aim because it's for personnal use and I won't learn from it anything ...
I made already long time ago a mailer with authentification etc... I want to improve it to make it support gmail and hotmail, that's my aim from all this ! and my mailer is just for me, not to sell, I made it long time ago to learn winsock and kept it to myself
-
Oct 16th, 2010, 06:02 AM
#12
Thread Starter
Hyperactive Member
Re: VB6 Winsock SMTP-SSL
I just noticed that the author said that his mail doesn't work with gmail except if we used cbo, i tried and it works !
What are the requirements for that ? outlook installed ? some dll ? some ocx ?
Do you have any link that explain about cbo method ?
-
Oct 17th, 2010, 01:52 AM
#13
Re: VB6 Winsock SMTP-SSL
 Originally Posted by justgreat
Thanks Nightwalker83, i will check the links you provided and keep you informed if it fits me.
By the way, the one posted on pscode,is not working on gmail ! I tried it with hotmail it works, but in gmail it doesn't, so it makes no sens for me to study it's code , i will see the one you provided Nightwalker83, thanks
Whatsup's code works with both gmail (tested by me) and live (hotmail, tested by Whatsup). I not sure if it works with Yahoomail since that requires a paid yahoo email. However the connection settings for it can still be found in the text file included Whatsup's code (I think I may have included them with my source code).
Also, there is no need to post multiple posts in a row, just click the "Edit" button and edit your 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
-
Oct 17th, 2010, 10:38 AM
#14
Thread Starter
Hyperactive Member
Re: VB6 Winsock SMTP-SSL
Thanks Nightwalker83,
His code works with gmail only if we use CDO !!
I found in the forum an easy way with CDO here
Thus, If i want to use CDO, no need to read all his long code, because I can add a function in my program, that use the CDO in case of gmail and it works with hotmail too .
Honestly I found the code too long and need time to understand it and at the end he has to use CDO, so why to waste time trying to understand (he has lots of modules, classes, ressources controls etc...) and what i want is simple, send email to gmail , hotmail, using SSL.
If you got a code more simple, I will be interested to study it
By the way, to use CDO, what are requirements on PC ? outlook ? office ?
-
Oct 17th, 2010, 10:54 AM
#15
Re: VB6 Winsock SMTP-SSL
No, CDO for Windows 2000 has been part of Windows since Win2K. It does not require Outlook or Outlook Express.
I also see that the subsequent posts in that thread continued using the brain-dead approach of spelling out those CDO Field Name strings even after I pointed out that constants are predefined in the library.
Arrghhh!
Last edited by dilettante; Oct 17th, 2010 at 10:57 AM.
-
Oct 17th, 2010, 10:57 AM
#16
Thread Starter
Hyperactive Member
Re: VB6 Winsock SMTP-SSL
dilettante, thanks for the information, please confirm If i got you, this mean i can use it on any windows after windows 2000 without any special installation ?
it will work on XP, VISTA and Win7 ?
-
Oct 17th, 2010, 12:19 PM
#17
Re: VB6 Winsock SMTP-SSL
If you set up the configuration properly, then yes.
A lot of people had been using CDO without realizing that it initializes itself based on the current user's MAPI default account information. This had been letting them get away with murder. Then when Vista came along and things didn't work that way any longer they cried and kicked a lot.
As long as you provide all of the config info you should be fine.
I just retested on Vista and Windows 7, both worked fine.
-
Oct 17th, 2010, 01:26 PM
#18
Thread Starter
Hyperactive Member
Re: VB6 Winsock SMTP-SSL
dilettante, thanks again to your reply,
What i should configure well ? any configuration i should do in the PC ? or the configuration inside my code ? (I do same like it's mentionned in the thread about cdo that i mentioned above and in which you participated)
-
Oct 17th, 2010, 01:52 PM
#19
Re: VB6 Winsock SMTP-SSL
I was talking about setting the Field values in the CDO.Configuration object's Fields collection. Every CDO.Message object has a CDO.Configuration object, or you can create one, set it up, and assign it to the CDO.Message's Configuration property.
Just try it, this is small potatoes stuff not rocket science. Even network admins use it all the time. When in doubt consult the docmentation.
-
Oct 17th, 2010, 02:25 PM
#20
Thread Starter
Hyperactive Member
Re: VB6 Winsock SMTP-SSL
Thanks a lot man, as always you give clear answers.
I will try to read a bit the documentation and will check again the other thread about cdo and try to see what it gives
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|