Re: Using Redemption in Integration Manager



OK, here's the situation. This process is supposed to run on a Citrix
server. A user connects in to the Citrix Server, using their NT Domain logon
and password. Once logged in, they run a C# application. This C#
application then executes Integration Manager. When in Integration Manager,
scripts are run. From these scripts, there is a logon to Outlook for the
email (the NS.logon event listed below for example). Since it is run from
the Integration Manager script, the logon and password of the profile for the
NS.logon segment is different than what the user has logged on to Citrix as.
Despite setting Outlook on the Citrix box to not display the message box
asking for a profile, and supplying a valid profile with password, we still
receive the pop up asking for a profile and password. We need to do this
programmatically and cannot see the profile pop-up. Going from your previous
responses, I thought what I had coded would do this.

"Dmitry Streblechenko" wrote:

1. Namespace.Logon takes the name of the *profile*, not the user
name/password. Or pass "" to use the default profile. Or don't specify any
parameters at all
2. Move the lines

Set ns = pOutlook.GetNamespace("MAPI") 'Application.GetNamespace("MAPI")
ns.Logon

to immediately after

Set pOutlook = CreateObject("Outlook.Application")

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Rob" <Rob@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:5921539D-8DA7-40BE-BBDB-FBF50460A747@xxxxxxxxxxxxxxxx
Here is the code I have in the Integration Manager script:
**************************
Dim rMail
Dim oItem
Dim pOutlook
Dim ns
Dim Sync

'Create the Redemption Object to be used in this program
Set rMail = CreateObject("Redemption.SafeMailItem") 'New
Redemption.SafeMailItem
Set pOutlook = CreateObject("Outlook.Application")
Set oItem = pOutlook.CreateItem(0)
rMail.Item = oItem
MsgBox (" passed by create Object - Outlook app")

'Get Outlooks Namespace - use this code when using POP3
Set ns = pOutlook.GetNamespace("MAPI")
'Application.GetNamespace("MAPI")
ns.Logon "username", "password", False, True
Set Sync = ns.SyncObjects.Item(1)
MsgBox (" passed by created getnamespace ")
******************************************
When I run Integration Manager, I get a popup before it will send the
email
that asks:
User Name:
Password:
Domain Name:

In this popup, the user name and domain name have values in them. What
concerns me is that this process is going to be run on a Citrix machine,
so
different users will be logging in. None of them have the same user logon
as
the one used to process the IM script (and Great Plains functionality),
and
send the email. I thought by providing the username and passord in my
NS.logon line that this would eliminate the popup. The email will only
send
out properly if I supply the password in the popup window when it comes
up.

"Dmitry Streblechenko" wrote:

I am not sure which popup you mean: there is a profile prompt password
(if
you specified to be prompted in the Mail Control Panel applet) and the
login
dialog if you are using the Exchange provider and you are logged in as a
Windows user other than the one who owns the mailbox in the profile.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Rob" <Rob@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:0941C729-A3FD-4EA6-86F7-7C10C53F1C5D@xxxxxxxxxxxxxxxx
Clarification: I have the NS.Logon. As the script is running in IM,
after
the Send method, sometimes I get a popup window prompting me for an
Outlook
profile and password.

"Rob" wrote:

OK, it runs, thank you. One remaining issue. If I do not have
Outlook
open,
the app prompts me for an Outlook profile. Is it possible to pass the
logon
and password as parameters on the NS.Logon line?

"Dmitry Streblechenko" wrote:

Application variable there refers to an instance of the
Outlook.Application
object, so it really has nothing to do with Redemption.
If your code is running anywhere but Outlook VBA (which exposes
Application
as an intrinsic object), you need to initialzize it using something
like

set Application = CreateObject("Outlook.Application")
set NS = Application.GetNamepace("MAPI")
NS.Logon

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Rob" <Rob@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:72A0A31C-7387-4677-878B-F2CB595BE5E0@xxxxxxxxxxxxxxxx
Here is the code. As I mentioned, this is in Microsoft's
Integration
Manager
app for Great Plains. Written as a script, using the VBScript
examples
from
your FAQ section on the Redemption Object site. It is Integration
Manager
9.0, associated with Great Plains 9.0, running on a Windows 2000
Server
machine, with Outlook 2003 (sp2)

Dim rMail
Dim oItem
Dim ns
'Dim Sync

'Create the Redemption Object to be used in this program
Set rMail = CreateObject("Redemption.SafeMailItem") 'New
Set oItem = Application.CreateItem(0)
rMail.Item = oItem
MsgBox (" passed by create Object - Outlook app")

' Testing against my email address
rmail.recipients.Add "someone@xxxxxxxx"
rmail.recipients.ResolveAll
MsgBox ("passed mail item to: ")

' Create the body of the email
strmessage = "Your GL batch " & BatchID & " was loaded
successfully.
" & VbCrLf & VbCrLf _
& "Date Loaded: " & Date() & Space(5) & "Time Loaded: "
&
Time()
& VbCrLf & VbCrLf _

' Create the Subject
strsubject = (" " & CO & " Using Outlook: Trial Balance Has Been
Imported
& Posted to Great Plains Successfully")
MsgBox ("passed by mail message content ")

' Set the message and subject
rmail.subject = strsubject
rmail.body = strmessage
MsgBox ("passed the body and subject lines")

'Send the e-mail
rmail.Send

--The error returned is "Object Required 'Application'" Occurring
where I
use Application.CreateItem(0) to create the oItem.

"Dmitry Streblechenko" wrote:

What are the relevant snippets of your code and what exactly do
you
mean
by
"it doesn't seem to recognize the Redemption object"?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Rob" <Rob@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:A4AD6C74-8911-4D10-910C-FCFAA92DAE47@xxxxxxxxxxxxxxxx
I'm trying to use Redemption to programmatically send out
emails
via
Outlook
from a script written to run from Integration Manager 9.0. I'm
following
the
VBScript conventions, but it doesn't seem to recognize the
Redemption
object.

Does anyone have any insight or familiarity with this?

Thank you












.



Relevant Pages

  • Re: Deleted Item not in deleted folder?
    ... you will get errors trying to instantiate a MAPI.Session if CDO 1.21 ... A piggy-back logon won't do you any good at all if Outlook isn't running. ... Or you can use the profile name if you know it: ...
    (microsoft.public.outlook.program_vba)
  • Re: Using Redemption in Integration Manager
    ... For Integration Manager to run, it needs to be run through GreatPlains. ... While the user is logged on to the Citrix machine under their domain logon, ... pop-up which is titled "Microsoft Office Outlook - Enter Password. ... And there is no such as thing as a profile password. ...
    (microsoft.public.outlook.program_vba)
  • Re: How do I Recover the emails in an old Outlook .OST file?
    ... can covert it to a PST file for recover or reconnect to that old OST file. ... If the original Microsoft Exchange profile existed and was not modified, ... The instruction to recover OST file when the original Outlook Profile ...
    (microsoft.public.windows.server.sbs)
  • RE: SBS2003 plus OL plus Business Contact Manager
    ... To check if your Outlook 2003 profile is configured to use "Cached Exchange ... once it is completed, you will see "Business Tools" ... Business Contact Manager for Outlook 2003 Update: ...
    (microsoft.public.windows.server.sbs)
  • Re: Change mail servers by scripting it
    ... apply changes with a .prf file. ... Sue Mosher, Outlook MVP ... > it to "modify" the Outlook profile it creates a new profile (not tested on ... > "migrate user settings". ...
    (microsoft.public.outlook.installation)