Capture Outlook email?

G

guzzy

I have a program that sends emails via outlook 2003 on my XP machine,
that I want to work when I'm not logged in. I can't seem to get
Outlook to load as a service, not to mention that annoying
'automatically send email' stop message, so I was wondering if there is
another
way. Is it possible to intercept the emails being sent by this other
program (I can't seem to change anything with the program, so I assume
it must be using the MSO libraries to actually send the messages?)
There should be a way to write a program that will act like an outlook
'Outbox', so that I can send the messages, and run my program as a
service. Any ideas on how to create this fake outbox?


Thanks


Dan
 
G

Guest

You can't automate Outlook via a Service app:

Outlook object model is unsuitable to run in a Windows service:
http://support.microsoft.com/default.aspx?scid=kb;en-us;237913

To deal with the security dialog you are receiving, review this info:

Microsoft Outlook "Object Model Guard" Security Issues for Developers:
http://www.outlookcode.com/d/sec.htm

What program is automatically sending these e-mails? Is this your custom app?

Otherwise, I'm not really sure what you are trying to do. If you are
automating Outlook to send e-mails, it will send them if there is a
connection, otherwise it will remain in the Outbox until it can send.
 
G

guzzy

It's not my app, but the manual says the outlook is required, so I can
only imagine that it was writen using the outlook libraries, and uses
the .send command, which puts the email in outlooks outbox, and then
lets outlook do the rest. As you stated, outlok won't run as a
service, so the question is:

How do I write a VB program that will receive this .send command (ie
pretend its the outlook outbox to receive the email created by the
other program), and send it myself (using an SMTP module or something
similar.)? My program should run as a service without much effort.
Then SMTP part is easy, but I don't know anything about how to create a
fake outbox to receive messages to send.

Thanks for your help.

Dan
 
G

Guest

Okay, I think I see now. What program is automating Outlook anyway?

Regardless, if this app is using the Outlook API, there is nothing you can
do to "intercept" it, beyond clicking no when the security dialog appears to
prevent it from sending e-mails.

If this app is using Simple MAPI, then it will be automating whatever MAPI
compliant e-mail application is the default for your system, which could be
Outlook, Outlook Express, Eudora, etc.

Regardless, unless you have the source code for this controlling
application, you can't intervene.

I still don't understand the purpose of intercepting the delivery of your
e-mails. Don't you want these e-mails to be sent?
 
G

guzzy

Yes, I want the messages sent, I want to send them without me having to
click the security button, and even better would be to send them when
noone is logged in (ie as a service), but I can't seem to get there
from here.
 
G

Guest

Are you using Exchange? If so, you can install the Outlook E-mail Security
Administrator Package from the Microsoft Office Resource Kit Web site
(http://www.microsoft.com/office/ork). This will allow you to configure the
removal of the warning when an application is automating Outlook to send
e-mails.

Otherwise, unless you have the source code for the app that's sending the
e-mail, you're out of luck. The only other option is to schedule a script to
launch Outlook at a specific time to send any e-mails that may be in the
Outbox.
 

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