oops, I see that the world has changed since the last time I looked.
OK, the sample code you posted is run on a mail server, and
the program is run as a user with permission to connect to the
SMTP service, which is probably unrestricted anyway, because
on the client side it is protected by a firewall, and on the internet
side it has to be open in order to receive mail.
The version of CDO that you are using is good for Windows 2000
Windows XP, Server 2003 and probably 2000. Don't know about
Vista. Different version numbers on different systems, which may
cause problems with Access early-binding.
As written, using 'localhost' it won't run on Windows 2000 or Windows
XP, because neither of those have SMTP services installed. You need
to change that to the name of your mail server. It may not run with
'localhost'
on your CITRIX server either, unless that happens to have a SMTP service
enabled, as it might if it is also a Web Server or an Exchange Server. You
can check to see if you can connect to your mail server SMTP service by
using Telnet or some similar program.
If you can't get through a firewall, you do that either by relaxing the
firewall,
or by configuring a firewall client on the citrix server. The firewall
client may
require a Windows login identity, but the SMTP service will not. What the
SMTP service might require is a valid network address: it might be set to
reject all local connections or network connections without a valid DNS
record.
(david)