Solved

Send Simple Email with Visual Basic 6

Posted on 2004-04-22
11
343 Views
Last Modified: 2013-11-25
Hi.

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!
0
Comment
Question by:Kane00
[X]
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
11 Comments
 
LVL 3

Expert Comment

by:rinksno1
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.

rinks
0
 

Author Comment

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

Accepted Solution

by:
lalithaw earned 50 total points
ID: 10886959
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Expert Comment

by:Javin007
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>
DATA
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
CC:
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
QUIT

That help?

-Javin
0
 

Author Comment

by:Kane00
ID: 11256984
Sorry, none of your solutions work.

Admin please close this question.
0
 

Author Comment

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

Expert Comment

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

Author Comment

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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
numbers ascending pyramid 101 240
Added a column screws up code 5 69
VS2015 Redefinition errors 4 91
Interview question Javascript, database 12 93
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

733 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