Email from MMN /NT using MAPISEND.EXE (164 Views)
Reply
Occasional Advisor
Gary Tomlin_2
Posts: 11
Registered: ‎03-08-2000
Message 1 of 13 (164 Views)

Email from MMN /NT using MAPISEND.EXE

Hi,

I am trying to setup an automatic action to send
emails using microsoft's MAPISEND command.

The MAPISEND command works from the command line
successfully if I use the following syntax

mapisend -u "Microsoft Outlook" -p "" -r gtomlin@protek.co.uk -s "Test Message
Subject" -m
"Test Message Body"

But when I try and run it from within NNM I get
a error 3 "login Failure" message. I think
the problem is with the environment that NNM runs
its automatic actions in. It seems to use the
"default user" environment rather than the user
I am logged in as. I have tried runnig ovactiond
(by modifing the lrf) as the login account, but
with the same results.

Has any body been down this path?

Thanks
GT
Super Advisor
Berlene Herren_1
Posts: 515
Registered: ‎10-15-1999
Message 2 of 13 (164 Views)

Re: Email from MMN /NT using MAPISEND.EXE

Remember that NNM uses the user "bin" to run automatic actions.

Berlene
Occasional Advisor
Randy Baker_2
Posts: 6
Registered: ‎04-12-2000
Message 3 of 13 (164 Views)

Re: Email from MMN /NT using MAPISEND.EXE

I am also having problems getting both mapisend and sendmail NT exchange email
commands functioning. Everything works from the command line, but nothing
works from automatic actions. I tried creating a batch file in the
openview\bin directory.

This user "bin", I could not find it in the user manager for the local system.
Where exactly is this user?

Any other suggestions on what I may need to get this functional?

Thanks,

Randy
Occasional Advisor
Randy Baker_2
Posts: 6
Registered: ‎04-12-2000
Message 4 of 13 (164 Views)

Re: Email from MMN /NT using MAPISEND.EXE

I checked my logs and I am also experiencing the "MAPI logon failed: 3" error.

Any help would be appreciated ...

Randy
Occasional Advisor
Randy Baker_2
Posts: 6
Registered: ‎04-12-2000
Message 5 of 13 (164 Views)

Re: Email from MMN /NT using MAPISEND.EXE

Still trying to troubleshoot.

I created an NT domain account named bin, configured an exchange account named
bin, created a local profile on the NNM console workstation (NT Server),
assigned the domain account bin full rights to the local server, created an
outlook profile named bin and then tested everything again.

Still having the MAPI Logon failures ...
Occasional Advisor
Randy Baker_2
Posts: 6
Registered: ‎04-12-2000
Message 6 of 13 (164 Views)

Re: Email from MMN /NT using MAPISEND.EXE

Next attempt:

modified the ovactiond.lrf file located in c:\openview\lrf directory.

Changed the last line to read:

OVs_YES_START:pmd:-u netmon:OVs_WELL_BEHAVED::

After saving the changes, ran the ovaddobj executable from the \bin directory
specifing the openview\lrf\ovactiond.lrf file.

Finished by evoking the ovstart command.

Using the following mapisend command:

mapisend -u "monitor" -p 111111 -r John Doe -s Test -m Test Message

to be continued ???
Occasional Advisor
Randy Baker_2
Posts: 6
Registered: ‎04-12-2000
Message 7 of 13 (164 Views)

Re: Email from MMN /NT using MAPISEND.EXE

In the continuing saga ...

I have been working on the ovactiond.lrf file. Currently, this is where my
confusion is.

Since I am using a NT domain account, how would I enter the user name? Would I
enter \\domain name\user name or would I use domain name\user name.

I can recreated the same MAPI logon error from the command line by using an
incorrect name in the - u parameter. This leads me to believe that the
ovactiond executable can not "log in" as my domain user account and is still
using the "bin" account.

Randy
Occasional Advisor
Gary Tomlin_2
Posts: 11
Registered: ‎03-08-2000
Message 8 of 13 (164 Views)

Re: Email from MMN /NT using MAPISEND.EXE

Hi,

I think Berlene's comments may relate to the UNIX version as UNIX has a
/usr/bin directory which
contains a number of 'shells'.

That a side, one thing I did try was to execute the
"set" command and pipe its output to a file as an
automatic action. The results showed that the
command was run as "default user" and not as the
user was logged in. I am no exchange expert, but
I wondered if there are some environment variables
that are needed before running mapisend. I tried copying the environment
variables that are set for my account into a batch file and then running that
instead of mapisend directly, unfortunatly, did not work and I still got the
error 3.

The other thing I tried was to change the owner of
ovactiond to my account using the -u option
in the lrf. This also did not work.

I am back in the office, Friday, and will have another
look at it and I will keep you posted with updates.

Thanks
GT
Occasional Advisor
Gary Tomlin_2
Posts: 11
Registered: ‎03-08-2000
Message 9 of 13 (164 Views)

Re: Email from MMN /NT using MAPISEND.EXE

Nearly working.

I have stopped ovactiond using ovstop -v ovactiond and then restarted it
directly from the command line. The command prompt did not return, so I just
left it running. I checked it was running as my user using a
freeware program HandleEx. The automatic action ran the mapsend command
succesfully.

The only problem is I can not get ovactiond to run with my user via the lrf
file, it always defaults to NT Authority:SYSTEM no matter what syntax I try.

Regards
GT
Occasional Advisor
Randy Baker_2
Posts: 6
Registered: ‎04-12-2000
Message 10 of 13 (164 Views)

Re: Email from MMN /NT using MAPISEND.EXE

Well ...

I gave up on the mapisend and sendmail commands!!!

I moved to using the telalert software instead. The free version is working
fine for what I need. I have several email groups I have emails sent to based
on the type of trap. One group just sends emails while the other one also
pages specific cell phones. All is working fine.

If you use telalert and need to make changes to the [destinations] section for
different email addresses, make sure you recompile the script using the
telalert -init option. Otherwise, telalert will not recognize the telalert.ini
changes.

Good luck ...
Advisor
Anonymous Coward
Posts: 15
Registered: ‎05-08-2000
Message 11 of 13 (164 Views)

Re: Email from MMN /NT using MAPISEND.EXE

Try this registry tweak from Microsoft:
HKUdefaultsoftwaremicrosoftmailmicrosoft mail:
Login:REG_SZ
ServerPath:REG_SZ
Password:REG_SZ

And set to the appropriate values.


http://support.microsoft.com/support/kb/articles/Q135/0/66.asp
----
It wasn't me!
"It wasn't ME"
Advisor
Armindo Guilamba
Posts: 26
Registered: ‎06-09-2000
Message 12 of 13 (164 Views)

Re: Email from MMN /NT using MAPISEND.EXE

Now I have mapisend.exe working
I have made some change on ovactiond.lrf to look like:
OVs_YES_START:pmd:-u NTuser1:OVs_WELL_BEHAVED::
The real situation is:
The user NTuser1 have administrator rights and HP OpenView Process Manager is running with that user account, I don't think it is required but I have done so.
In the exchange server I create a mail acount called HP OpenView NNM and I gave NTuser1 permision to use the account.

It is working.

Good Luck
Occasional Visitor
Yuval Raiz
Posts: 2
Registered: ‎06-01-2000
Message 13 of 13 (164 Views)

Re: Email from MMN /NT using MAPISEND.EXE

You can use the following blat.exe http://gepasi.dbs.aber.ac.uk/softw/blat.html
which is simple SMTP sender.
It works just like sendmail in UNIX
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.