Improve company productivity with a Business Account.Sign Up

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 369
  • Last Modified:

Send Simple Email with Visual Basic 6


I would like to send a simple email using a feedback form I have created. I have tried MAPI, but that opens your default email client.

All I have is a Your Name box, a Your Email Adress box, two radio buttons for feedback/bug report (more may be added, I'm not sure), and a details box.
I would like it to send to an email address preferably defined in the code, with a subject that changes depending on which of the two radio buttons is selected; I want the email to appear something like this:

Name: John Smith
Selected Topic: Feedback
Details: Hmm~

Yes, I am a newbie at VB... Any help would be great!
1 Solution
well first thing is that you need an isp mail ie. a pop enabled mail to enable sending mails using vb in mapi too you must have a pop email account to use the mailing feature, you cannot send your mails using yahoo,hotmail and other free email providers with your vb application.

Kane00Author Commented:
Ok, say i want to use by bigpond email for it. Then what?
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

I'd send ya to look at the POP3 RFC, but it's written by a drunken goat.

Basically, just make a winsock connection to the server, and it'll immediately respond with a 220 reply saying "Hi, I'm so and so."  Then you do the following.  Remember any numbered response is the response you EXPECT to see from the server.  The commands are the caps things that you'll actually SEND to it through winsock (don't forget to end all of your lines you send with vbCrLf:

220 Hiya!  Welcome to ye' ol' generic E-Mail app.
HELO MyDomain.Com
250 OK
250 OK - mail from <>
250 OK - Recipient <>
250 OK - Recipient <>
354 Okeydokie, send the data sparky.

Here it gets a little interesting.  This is where you actually build the E-Mail.  There's a THOUSAND different ways to build the E-Mail, but the basics are:

Subject: Buy Cheap Viagra Online!
Mime-Version: 1.0
Content-Type: text/plain;charset="us-ascii"

Now this is where you put all the text that's in the body of the message.  When you get to the end of the message, you end it with a carriage return/line feed/period/carriage return/linefeed.  (vbCrLf & "." & vbCrLf)  Once that's entered, you'll receive an OK command, and will need to terminate your connection gracefully:

250 - OK

That help?

Kane00Author Commented:
Sorry, none of your solutions work.

Admin please close this question.
Kane00Author Commented:
Where can I get the vbSendMail.DLL?
Read the posts in this question.  In particular: http:#10886959
Kane00Author Commented:
No solutions were suitable for my needs but I will accept one anyway to get the admins off my back....
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.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now