Send Email From VB6

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
michael4606Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

d3nCommented:
http://www.freevbcode.com/ShowCode.Asp?ID=109

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


0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Antagony1960Commented:
0
Antagony1960Commented:
Ah, you beat me to it d3n.  :D
0
game-masterCommented:

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
michael4606Author Commented:
All cool options.   Thanks guys.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Email Servers

From novice to tech pro — start learning today.