2287 error on SendObject

B

Brian

I have a very simple use of SendObject that is failing on a Windows 2003
server. with a "2287 Microsoft Access can't open the mail session" error.

DoCmd.SendObject acSendNoObject, , , EMailAddress, , , MessageSubject,
MessageBody, False, False

The three variables EMailAddress, MessageSubject, and MessageBody are
properly-dimensioned as strings with the values set in preceding code (it all
works fine on my Windows XP Pro / Office 2003 Pro SP3 development station),

However, when I copy the MDB to the Win2003 server (running Outlook 2003 &
Access 2003 runtime, with Office 2003 SP3 updates applied), I get the 2287
error. It is rather difficult to debug, though, because it is running on an
Access 2003 runtime installation. Everything else in the app works fine on
the server.

Outlook runs fine on the server.

I have other SendObject code running on other Windows 2003 servers that also
have Outlook 2003 & Access 2003 runtime, but perhaps there is some different
file version.
 
G

Gina Whipp

Brian,

Right off the bat I have to wonder, is this database split? Generally,
Outlook is loaded locally and that is where the mail is sent from, your
local machine not the Server, at least where Microsoft Outlook is concerned.
So the first thing I would advise is splitting the database....
http://allenbrowne.com/ser-01.html

Afterwards, your code should have no problem running.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm
 
B

Brian

I always split my DB's. I house the BE (MDB) in a shared folder on the
server, with a copy of the FE (MDE) distributed to each workstation. The
users access the BE via linked tables in the FE.

Everything else runs perfectly in this DB, whether I run it on the server
(using a locally-linked copy of the FE) or on a workstation, where the link
is via a mapped drive.

The reason this copy runs on the server is that I am configuring some
components to run automatically (Form_Timer to process certain automated
updates and e-mail notifications, rather than requiring a user to oversee the
process).

I have used SendObject many times in virtually identical circumstances with
no problem:

-Windows 2003SBS
-Outlook 2003
-Access 2003 runtime

....and the code works fine using the same FE linked to the same BE (via the
mapped drive) from a workstation. There must be something different about the
Outlook on the server.
 
G

Gina Whipp

Brian,

I misunderstood, glad your database is split. Yes, there is something
different when Outlook is on the server. UNLESS the Server has an eMail
account and can send eMail then Outlook can't do the same which is why it's
done from the local workstation.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm
 
B

Brian

Outlook functions correctly on the server, and I have the entire process
working (including no error on SendObject) on two other similar servers at
two other clients' offices.

Maybe this is more of an Outlook/Exchange question.
 
B

Brian

I thought about the references, and that is a very good point. However, given
that this is Access runtime, I now have to write code to check the references
for me. I have seen that somewhere before - probably in this forum.
 
G

Gina Whipp

Yep, found it for you... Watch out for word wrap...


Sub ViewReferenceDetails()

Dim ref As Reference

For Each ref In Access.References
Debug.Print ref.Name & " - " & ref.Major & "." & ref.Minor & " - " &
ref.FullPath
Next ref

End Sub

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm
 

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