D
dcook23
I have created a script that uses SMTP to send an email off a
designated server and then uses redemption to check if the message has
arrived in the specified mailbox. The script is being automatically
kicked off by a monitoring product and running under an account that
has an Outlook profile setup. The script works great if the account is
logged on to the machine no matter if Outlook is already open or not.
If the account is not logged on then the script will not continue
beyond the line below.
set Inbox = Session.GetDefaultFolder(olFolderInbox)
I have tried to trap an error message but nothing after the line above
is executed but the script exits. My question is does redemption
require the user account be logged in?
The full piece of my code that is using redemption is below.
Const olFolderInbox = 6
set Session = CreateObject("Redemption.RDOSession")
Session.Logon
set Inbox = Session.GetDefaultFolder(olFolderInbox)
for each Msg in Inbox.Items
for each att in msg.Attachments
If lcase(left(att.filename,4)) = "fax-" Then
If DateDiff("n",msg.ReceivedTime,FaxSentTime) <
5 Then
vSuccess = "yes"
End If
End If
Next
msg.delete
Next
designated server and then uses redemption to check if the message has
arrived in the specified mailbox. The script is being automatically
kicked off by a monitoring product and running under an account that
has an Outlook profile setup. The script works great if the account is
logged on to the machine no matter if Outlook is already open or not.
If the account is not logged on then the script will not continue
beyond the line below.
set Inbox = Session.GetDefaultFolder(olFolderInbox)
I have tried to trap an error message but nothing after the line above
is executed but the script exits. My question is does redemption
require the user account be logged in?
The full piece of my code that is using redemption is below.
Const olFolderInbox = 6
set Session = CreateObject("Redemption.RDOSession")
Session.Logon
set Inbox = Session.GetDefaultFolder(olFolderInbox)
for each Msg in Inbox.Items
for each att in msg.Attachments
If lcase(left(att.filename,4)) = "fax-" Then
If DateDiff("n",msg.ReceivedTime,FaxSentTime) <
5 Then
vSuccess = "yes"
End If
End If
Next
msg.delete
Next