Sending an Email from Access...

B

Brad Pears

I have downloaded code that makes use of the "Microsoft Outlook Object 10
Library" to create and send email messages using the following code

Dim objOutlook As Outlook.Application
Dim objEmail As Object
'Dim objEmail As Outlook.MailItem

Set objOutlook = CreateObject("Outlook.application")
Set objEmail = objOutlook.CreateItem(olMailItem)
With objEmail
.To = strTo
.Subject = strSubject
.body = strBody
' .Attachments.Add "C:\Test.htm"
'.attachments.Add "c:\Path\to\the\next\file.txt"
.ReadReceiptRequested = True
.Importance = olImportanceHigh
.Send
End With

We are using an Exchange 2000 server and Outlook 2002 clients to
send/receive our mail.

This code is not working for users of our Windows 2000 terminal server but
works fine for our Win98, WinXP and Windows 2003 term server users. However,
I need a solution that works on all platforms. I haev made sure that all
servers have the same Service Pack, vertsions etc... installed for Office
but still it will not work. It crashes every time on the "Set objEmail =
objOutlook.CreateItem(olMailItem)" line with a useless error message. I
cannot find a solution anywhere....

Because of this, I wonder if there is any other way to send email internally
(or external then back in) without having to use the Outlook client to send
it. Maybe by installing a freebie SMTP server or something of that nature??

Since I cannot find any answers to my exact problem (and the error being
reported is so generic it really stinks) I have just given up and want an
alternative method of generating emails without having to use the Outlook
client. Of course all emails will still have to be sent to our Exchange
server for routing to the appropriate receipient.

Anyone have any ideas???

Thanks,

Brad
 
B

Brad Pears

Looks like a nice product!! Unfortunately right now I do not have a budget
for that. I was hoping to find something free or just some sample code that
does this...

Using SMTP instead of the Outlook client is exactly what I am looking for
though....

Thanks,

Brad
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top