?
Solved

Send Email From VB6

Posted on 2008-11-05
5
Medium Priority
?
1,471 Views
Last Modified: 2013-12-18
Hello,

How can I send a standard SMTP email message (no attachments) from a VB6 application?

Caveats
* Cannot use any third part solutions (ActiveX, DLLs etc.).  A native VB6 email function library would be OK though.
* Must be native to VB6.
* Must work on Windows 2003 servers and Windows XP.

I have scoured many Google listed sights and have not found anything that meets the about criteria yet.  
Perhaps I can use the MAPI controls, but I just need to send a simple email (not explicitly interfacing to an Exchange server).

I have a DOS tool that uses mailsend.exe from muquit.com.  It only requires the SMTP server IP and email address.  I was hoping for a native VB6 solution that would be this easy in VB6 too but not sure what the code would look like.


Thanks,

Michael
0
Comment
Question by:michael4606
5 Comments
 
LVL 1

Accepted Solution

by:
d3n earned 240 total points
ID: 22886665
http://www.freevbcode.com/ShowCode.Asp?ID=109

Download the zip and use the classes of the vbSendMail in your own vb-app


0
 
LVL 11

Assisted Solution

by:Antagony1960
Antagony1960 earned 160 total points
ID: 22886755
0
 
LVL 11

Expert Comment

by:Antagony1960
ID: 22886760
Ah, you beat me to it d3n.  :D
0
 
LVL 13

Assisted Solution

by:game-master
game-master earned 100 total points
ID: 22892206

good morning!

try this...

goto PROJECT>REFERENCES>MICROSOFT CDO FOR WINDOWS 2000 LIBRARY


use this code...

sub sendEmail()
   Dim objCDO As New CDO.Message
   
    With objCDO
         .Subject = "Test"
         .From = "alvindoliente@yahoo.com"
         .To = "addoliente@findme.com.ph"
         .TextBody = "Hello alvin... this is a test message."
         .Send
    End With
end sub

i hope this will give u idea...
0
 

Author Closing Comment

by:michael4606
ID: 31513524
All cool options.   Thanks guys.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

The new Gmail Phishing Scam going around is surprising even the savviest of users with its sophisticated techniques.
When you’re making plans to join the modern business race, you should analyze various details that may affect your results. Nowadays, millions of businesses are trying to grow into established and appreciated professional enterprises.
In this video we show how to create a Shared Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Sha…
To show how to generate a certificate request in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Servers >> Certificates…
Suggested Courses
Course of the Month16 days, 21 hours left to enroll

862 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