Re: MAPI wouldn't run while Windows 2003 Server is on the log off mode. How to make it run? by Willianto
Willianto
Wed Mar 05 20:15:40 CST 2008
Hi Dan, Hi Jan:
Jan wrote:
> if your app runs on server and no one is logged in, what OE should MAPI
> use? AFAIK the OE is always configured for specific user (if configured at
> all).
Jan, OE is configured properly (afaik). The account is already specified and
it can receive and send messages properly. I also have configured the
scheduled task and make it run as valid user (actually I even run it as an
administrator) and obviously with the password.
Dan wrote:
> But there's actually a possibility that OE was designed NOT to run unless
> there's a valid Windows logon. I don't know, but I can see that happening.
Well, looks like I have to give up. I think you're right. If only you were a
Microsoft support people, I think you're reply would be: "It is by design"
<LOL>
> For this type of mail, MAPI is kinda the wrong choice. You should probably
> bypass the mail *client* (using MAPI) and use SMTP to communicate directly
> with a mail *service*.
I am considering this. But problem is it won't be that easy to do so. See,
I'm sending the e-mail to gmail account which means I have to use SSL. I
cannot use simple SMPT or Winsock. I'm thinking to use blat and stunnel to
create an SSL layer, but I'm afraid it won't be easy -- at least not as easy
as MAPI.
Anyway, thank you very much for replying. Still, if you have more idea about
this, I am looking forward to hearing about it.
WBR,
Willianto
"Dan Freeman" <spam@microsoft.com> wrote in message
news:ePVJo6tfIHA.2448@TK2MSFTNGP03.phx.gbl...
> I'd start with Jan's suggestion and check the user ID assigned to the
> scheduled task.
>
> But there's actually a possibility that OE was designed NOT to run unless
> there's a valid Windows logon. I don't know, but I can see that happening.
>
> For this type of mail, MAPI is kinda the wrong choice. You should probably
> bypass the mail *client* (using MAPI) and use SMTP to communicate directly
> with a mail *service*.
>
> Dan
>
> Willianto wrote:
>> Hi Dan,
>>
>>> So what happens? Is there an error? Does your PC burst into flames?
>>
>> Umm... no, although burst into flames might help to locate the exact
>> error <lol>
>>
>> Ok now, sorry for not conveying the problem well. I'll try to put it
>> better; My task is to create an apps on a factory that read daily
>> transaction and send the data to the office in another city. What I
>> have done is I created an application, that create a temporary
>> database, read required data, and compressed the data (using rar).
>> After that, the user should send the rar file (DAILY_TRANS.RAR) by
>> e-mail. Because the user wants to automate the sending process, I
>> add some code to send it via MAPI mail. (The code was modified from
>> Craigs Boyd's SendViaMAPI procedure found on his blog - see attached
>> mylib.vcx) and automatically run the apps on some specific time with
>> Windows' Scheduled Tasks help.
>> PROBLEM:
>> The applicaton runs on the server (Windows 2003 Server SP2). Thus,
>> obviously, most of the time the server is on the log off state. I
>> found that the file DAILY_TRANS.RAR created succesfully on expected
>> time. The Windows Scheduled Tasks indicate that the apps runs fine
>> (got it from the 'Last Run time'), but the file DAILY_TRANS.RAR
>> doesn't exist in the OE outbox. BUT, if I log in to the server, say
>> at 10:57 (the task is scheduled to run on 11:00), and use the server
>> (so that it won't go to the lock mode/log off), then the apps runs
>> fine, and this time the sending process also runs as expected.
>>
>> QUESTION:
>> How to make the apps able to send the mail even though the Win2K3 is
>> on the log off mode?
>>
>> I hope I convey this better now.
>> I'm looking forward to hearing from all of you.
>>
>> Thanks in advance,
>> Willianto
>
>