Can someone show me how to send mail using Winsock.
For example I want to send mail to
subject "test"
boby "testing email"
how would the code look?
Who is Participating?
tanc02Connect With a Mentor Commented:
In order to use winsock for vb programming, you must have vb professional or enterprise edition.

you can go to this URL below, it will show you how to di it plus documentation :

If you have any question, please feel free to ask.
I will assist you !
MChuAuthor Commented:
after reading the help file i don't know how to add a winsock control. can you show me how to add it?
go to Project, then select Components. You should see a list of control in the list box. Then you can select Microsoft Winsock Control and click ok. After that,
you will see the winsock control in the toolbox.

If you didn't see the winsock control in the list box, then select Browser button,
and select MSWINSCK.ocx. If you cann't see it, then you have go to the
microsoft homepage and download.

Ok. Let assume, you have it in the toolbox. Then click on it and put it in the form.
Then copy and paste the code from the URL that I gave you. You should be able
to send an E-mail. I am sure because I tried it and it worked.

Feel free to ask any question.
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

MChuAuthor Commented:
ok i put the winsock control on and cut and paste the code. everything seems to be working, the command button went unenabled and enabled able so i guess it must have sent the mail, however i didn't receive it.  it is something else that is missing?
MChuAuthor Commented:
ok, i think i have found the problem.  i don't think the mail server is working.  Do you know any free mail servers out there.  Thanks a lot for all your help.
MChuAuthor Commented:
Adjusted points to 500
you can try this server ""
MChuAuthor Commented:
Thank you for your help.  I think the problem I am having with sending out the email is with the mail server.  
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.