Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending e-mail from VB

Status
Not open for further replies.

waytech2003

Programmer
Jul 14, 2003
316
US
I reading the FAQ, I found a method of sending email without Outlook. It said I had to add a refeerance to the CDO 1.21 object. I do not seem to have this object on my system. Where can I get it?

I have VB6sp4 on a Win98SE Computer. I also have MSOffice 2000 Premium installed.
 
AFAIK CDO 1.21 comes with Exchange 5.5 onwards. There are other documented ways of sending email from VB without Outlook by using the MapiSession and MapiMessage controls.

A quick search on this site for 'mapisession' brought up sevearl threads, including thread222-616754 where I posted some fairly complete code.

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
CDO also ships with Outlook. Up to 98 it was included in a default installation but from 2000 onwards you have to select it during a custom installation.

Paul Bent
Northwind IT Systems
 
Thanks for the replys, I will check out the MapiSession and MapiMessage methods.
 
I use a com object called samail.

Here is an example of a function I use to send email. This is from an asp page:

function sendEmail(address,title,body,attachment)
dim objM

Set objM = Server.CreateObject("SoftArtisans.SMTPMail")
objM.FromName = "iqzero.net"
objM.FromAddress = "iqzero.net"
objM.addrecipient "", address
objM.Subject = title
objM.bodytext = body
'objM.SMTPLog = "c:\temp\samail.log"
objM.RemoteHost = "jlgweb"
if attachment <> &quot;&quot; then
objm.addattachment attachment
end if
if objM.SendMail then
sendEmail = true
else
sendEmail = false
end if
set objM = nothing
end function

It is much easier than the cdonts objects, and trouble free. If you have a local mail server, there is a free version that you can get. There is also a version that authenticates to an email account.

Jonathan Galpin MCSD
because software should be easy to use
 
Thanks jlgdeveloper,

I searched Google and found vbSendMail.dll by Dean Dusenbery at
This seem to be what I need at this time. I am going to do some testing to see if it works with my ISP account.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top