Solved

Send Simple Email with Visual Basic 6

Posted on 2004-04-22
11
310 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
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
 
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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
JSON Response and request in VB6 application 11 145
How To Loop - Python 19 67
Using MS Code on my Mac 6 47
Trouble with References... 5 25
How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
This article will show, step by step, how to integrate R code into a R Sweave document
This video teaches viewers about errors in exception handling.
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…

746 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now