SMTP usage with LAN....

sjl

Registered User.
Local time
Today, 03:21
Joined
Aug 8, 2007
Messages
221
My SMTP code is working well, IF I am logged into our LAN.

Is there any other code line(s) I can add that will get around this?

(This code sits in an Access FORM, which is triggered (weekly) by Windows' Scheduled Tasks and an Access macro).


strSch = "http://schemas.microsoft.com/cdo/configuration/"
Set objCDOConfig = CreateObject("CDO.Configuration")
With objCDOConfig.Fields
.Item(strSch & "sendusing") = 2
.Item(strSch & "smtpserver") = "smtp.xxxxx.xxx.gov"
.Item(strSch & "smtpserverport") = 25
.Item(strSch & "smtpconnectiontimeout") = 60
.Update
End With


'I added this to see if would run w/o me being logged into LAN--it did not; .Item(strSch & "smtpauthenticate") = cdoBasic
.Item(strSch & "sendusername") = "xxxx@xxxxx.xxx.gov"
.Item(strSch & "sendpassword") = "yyyyzzzz"

thanks,
SJL
 
I haven't scheduled anything for a long time due to a group policy setting that changes the reg entry for the security warnings, but I do remember trying to find a way around this and never did. I think that the windows scheduler is based strictly on each users profile. So if that user is not logged in it can't run the schedule. I always had to make sure that I just stayed logged in. We had a dummy box that was used for this part only.
 
Interesting. And, thanks for your input.

Scheduled Tasks has a checkbox that says "Run only if logged on". I've been leaving this unchecked: Doesn't that get around the issue of needing to stay logged on? It also asks for userid ("Run as:" text box) and pwd.

When you were running ST, were these options available?

Anyone else have any ideas how I can get this to run being logged off our LAN?
 
Interesting. And, thanks for your input.

Scheduled Tasks has a checkbox that says "Run only if logged on". I've been leaving this unchecked: Doesn't that get around the issue of needing to stay logged on? It also asks for userid ("Run as:" text box) and pwd.

When you were running ST, were these options available?

Anyone else have any ideas how I can get this to run being logged off our LAN?

It's been a while but I think the Run as options are used when the screen is locked. So technically you are not "Logged In" in windows terms because the screen is locked.
 
AutoIT3 includes a RunAs function with user and password stored as parameters. (Once compiled these are not visible but the developer does warn his encryption method is not bulletproof).

That would get around the RunAs password dialog but from what has been posted it appears this would not be enough.
 

Users who are viewing this thread

Back
Top Bottom