Send Simple Email with Visual Basic 6

Posted on 2004-04-22
Medium Priority
Last Modified: 2013-11-25

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
Email: someone@experts-exchange.com
Selected Topic: Feedback
Details: Hmm~

Yes, I am a newbie at VB... Any help would be great!
Question by:Kane00
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

Expert Comment

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


Author Comment

ID: 10886913
Ok, say i want to use by bigpond email for it. Then what?

Accepted Solution

lalithaw earned 100 total points
ID: 10886959
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.


Expert Comment

ID: 10889665
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
MAIL FROM:<ReturnAddress@MyDomain.com>
250 OK - mail from <ReturnAddress@MyDomain.com>
RCPT TO:<ThisGuy@yahoo.com>
250 OK - Recipient <ThisGuy@yahoo.com>
RCPT TO:<ThisGuyToo@aol.com>
250 OK - Recipient <ThisGuy@yahoo.com>
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:

From: ReturnAddress@MyDomain.com
To: ThisGuy@yahoo.com, ThisGuyToo@aol.com
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?


Author Comment

ID: 11256984
Sorry, none of your solutions work.

Admin please close this question.

Author Comment

ID: 11266851
Where can I get the vbSendMail.DLL?
LVL 49

Expert Comment

ID: 11273166
Read the posts in this question.  In particular: http:#10886959

Author Comment

ID: 11412791
No solutions were suitable for my needs but I will accept one anyway to get the admins off my back....

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

The purpose of this article is to demonstrate how we can use conditional statements using Python.
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

777 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