Re: Problems with Email, cusmapi
- From: "Anders Altberg" <anders.altberg>
- Date: Thu, 22 Mar 2007 20:53:22 -0700
When they are installed and registered you can explore them in VFP's Object
Browser - > COM Libraries: Check Microsoft MAPI messages Control, v 6.0, or
Microsoft MAPI Sessions Control, v6. It's really two classes in the same
ocx.
It's surprising that they weren't installed by default on your computer.
-Anders
"Barley Man" <BarleyMan@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:E37A950D-B65D-4B30-8C3A-2E89216EFDD4@xxxxxxxxxxxxxxxx
Thanks guys.
That explained the relationship BUT......
I have now fixed the problem but it needed additional files and routines
to
install them. Anyone else with similar problems, go to the web site
www.nbcsoftware.com. They supply a freeware 'package' which contains two
files which need to be 'run'. Secondly, you need to find a copy of thle
file
called msmapi32.ocx and copy that into the Windows\system32 folder.
Further
instracutions are included in nbcsoftware's help page about running
regsvr32
to 'install' the msmapi32.cox and running a program called fox.reg which
modifies the registry.
Anyway, it all works now. Thanks for pointing me in the right direction.
ian
"Dan Freeman" wrote:
MAPI is the Mail API (Application Programming Interface) and is not,
itself,
anything executable. It's just a protocol.
The MAPI controls are activex controls typically installed with other
applications (like yours) that need access to the MAPI-compliant mail
system
(such as Outlook).
VFP ships with MAPI controls, as do many other applications.
I do not have specifics on distributing it because I don't distribute it.
Sorry.
Dan
"Barley Man" <BarleyMan@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:BF21D583-A657-4D94-8135-DBEF9A520882@xxxxxxxxxxxxxxxx
I'm still confused.
Does MAPI get installed during the automatic installation of Outlook?
Do I need to change a setting in Outlook to 'enable' MAPI?
Was MAPI a series of files that I downloaded and just need to be copy
them
to the corect directories?
You guys seem to understand what MAPI actually is whereas I really
don't
have any sort of 'handle' on it.
Ian
"Jan Bucek" wrote:
Dan Freeman napsal(a):
If the mapi controls are not installed for sending mail, you can't
run
their
GetErrorInfo() method either because they're not installed.
GetErrorInfo() is method of CUSMAPI. If the MAPI controls are not
installed (not found), the method SendMail returns negative value (I
am
sure, I have seen it).
The problem of (correct) installation of MAPI is out of scope of my
knowledge. I remember discussion about this, but whether this or other
forums...
Dan
"Barley Man" <BarleyMan@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:B820AD37-844E-4E4B-8EED-53572C6D229F@xxxxxxxxxxxxxxxx
Well......... errrr..... yes and no!
There are two problems. The first is the problem that is causing
the
Error
routine to be initiated:-
â??cErrTxt=cErrTxt+Chr(10)+oMail.GetErrorInfo(nI)â??
....... However, I can't proceed in trying to fix this because the
above
line of code fails on the machine where the program fails and
doesn't
get
'called' on the machines where there is no problem so I can't tell
if
it
WOULD fail on those machines as well.
Thus I can't see what is the initial, triggering fault as the error
reporting system doesn't work. Unless you are saying that the :-
oMail.GetErrorInfo(nI)
...... is part of a problem with the Mapi 'tools' and thus a
failure
in
those tools prevents triggers the fault AND prevents the system
reporting
what has gone wrong.
To be sure, how do I 'install' the mapi tools on the machines which
won't
work? I didn't think I'd done any 'installation on 'my' machines to
get it
to
work in the first place. Do you think that I MUST have installed it
and
have
forgotten? If so, how the hell did I do it?????
Ian
"Jan Bucek" wrote:
If I understand your problem right, your program works O.K. on 4
PCs
and
fails on 3 other PCs. In this case your program code is O. K. and
your
problem seems to have something to do with installation of MAPI
components.
Barley Man napsal(a):
I have created a routine to mail batches of emails. It works
perfectly
on all
4 of my PCs at home but fails on all 3 of a colleaguesâ??
machine.
We
both use
Outlook XP (2002) and both use XP SP on our machines.
I got the information on how to use â??cusmapiâ?? to email from
this
forum and
pasted the suggestion with modifications into my â??programâ??.
However, run on
my colleaguesâ?? machine, the program not only fails but fails
at
the
point
where it tries to tell me HOW it failed. The system is unable to
use
the
error message system in this line:-
â??cErrTxt=cErrTxt+Chr(10)+oMail.GetErrorInfo(nI)â??
â?Åsâ?Ås as it doesnâ??t recognise the oMail.GetErrorInfo(nI)
part pof
the
instruction.
I canâ??t see whatâ??s missing: should the oMail.GetErrorInfo()
be
somewhere
accessible in the code or is it inherent in the call to cusmapi?
Is
there a
misprint in the spelling of o.Mail.GetErrorInfo()?
Without being able to see the content of the â??helpâ??
message, I
canâ??t â??debugâ??
what causes the failure in the first place. As my development PC
doesnâ??t
â??failâ??, I canâ??t use the debugger which is on that
machine
to see
the problem!
Any suggestions?
Here is the section in which the component â??failsâ?? to run:
******************************************************************
* CREATE list of email recipients
***********************************
* First create compulsory main recipient, won't work without at
least
ONE
"To;"
m.cRecipients=Alltrim(parafile.defemail)+";"
* Compulsory Main recipient created
Select allblock
Go Top
Scan
m.cRecipients=m.cRecipients+"BCC:"+(Alltrim(allblock.alemail))+";"
Endscan
Set Classlib To MAPIMAIL Additive
oMail=Createobject("cusmapi")
nOK=oMail.SendMail("", "", cRecipients, m.subjtext, m.mailtext,
m.cAttachments)
Do Case
Case nOK=0
* ?? Chr(7)
Wait Window Nowait Alltrim(Str(m.emailno))+ " EMails created"
Case nOK > 0
cErrTxt=""
For nI=1 To nOK
cErrTxt=cErrTxt+Chr(10)+oMail.GetErrorInfo(nI)
Endfor
Messagebox([Errors:]+cErrTxt, 64, "# of SendMail errors:
"+Transform(nOK))
Case nOK < 0
Messagebox("MAPI client not available")
Endcase
Select allblock
Delete All
m.blockcount=0
Select client
.
- Follow-Ups:
- Re: Problems with Email, cusmapi
- From: Barley Man
- Re: Problems with Email, cusmapi
- References:
- Problems with Email, cusmapi
- From: Barley Man
- Re: Problems with Email, cusmapi
- From: Jan Bucek
- Re: Problems with Email, cusmapi
- From: Barley Man
- Re: Problems with Email, cusmapi
- From: Dan Freeman
- Re: Problems with Email, cusmapi
- From: Jan Bucek
- Re: Problems with Email, cusmapi
- From: Barley Man
- Re: Problems with Email, cusmapi
- From: Dan Freeman
- Re: Problems with Email, cusmapi
- From: Barley Man
- Problems with Email, cusmapi
- Prev by Date: Re: Problems with Email, cusmapi
- Next by Date: Re: VFP 9 - SQL Server 2005!
- Previous by thread: Re: Problems with Email, cusmapi
- Next by thread: Re: Problems with Email, cusmapi
- Index(es):
Relevant Pages
|
Loading