Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17



Posted on 1999-07-25
Medium Priority
Last Modified: 2013-11-13
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?
Question by:MChu
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3

Accepted Solution

tanc02 earned 2000 total points
ID: 1527326
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 !

Author Comment

ID: 1527327
after reading the help file i don't know how to add a winsock control. can you show me how to add it?

Expert Comment

ID: 1527328
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.
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.


Author Comment

ID: 1527329
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?

Author Comment

ID: 1527330
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.

Author Comment

ID: 1527331
Adjusted points to 500

Expert Comment

ID: 1527332
you can try this server ""

Author Comment

ID: 1527333
Thank you for your help.  I think the problem I am having with sending out the email is with the mail server.  

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question