Discussion:
MAPISendMail function from FoxPro
(too old to reply)
Taras Kolakovic
2005-01-18 06:58:31 UTC
Permalink
Hi!
I'm trying to send E-mail from FoxPro using Simple MAPI directly without any
ocx controls.
Does anybody have any useful examples how to declare and then call
MAPISendMail function? The main problem seems to be that this function has
type structures as input parameters, which can't be declared in FoxPro.
Other problem is that i don't know how to declare it, is it the same as from
Visual Basic?

Regards,
Taras
Mike Gagnon
2005-01-18 13:20:49 UTC
Permalink
http://support.microsoft.com/kb/q146641/
Post by Taras Kolakovic
Hi!
I'm trying to send E-mail from FoxPro using Simple MAPI directly without any
ocx controls.
Does anybody have any useful examples how to declare and then call
MAPISendMail function? The main problem seems to be that this function has
type structures as input parameters, which can't be declared in FoxPro.
Other problem is that i don't know how to declare it, is it the same as from
Visual Basic?
Regards,
Taras
Taras Kolakovic
2005-01-18 13:54:00 UTC
Permalink
Thanx for your answer, Mike, but this is not exactly what i was looking for.
It looks like this method also needs a OLE Messaging Library installed. I'm
trying to send mail by declaring MAPISendMail function, which should work
without any libraries installed except of those which come with Windows
itself (something like MAPI.dll)

Cheers, Taras
Post by Mike Gagnon
http://support.microsoft.com/kb/q146641/
Post by Taras Kolakovic
Hi!
I'm trying to send E-mail from FoxPro using Simple MAPI directly without
any
Post by Taras Kolakovic
ocx controls.
Does anybody have any useful examples how to declare and then call
MAPISendMail function? The main problem seems to be that this function has
type structures as input parameters, which can't be declared in FoxPro.
Other problem is that i don't know how to declare it, is it the same as
from
Post by Taras Kolakovic
Visual Basic?
Regards,
Taras
Mike Gagnon
2005-01-18 14:19:56 UTC
Permalink
http://www.news2news.com/vfp/?example=343
Post by Taras Kolakovic
Thanx for your answer, Mike, but this is not exactly what i was looking for.
It looks like this method also needs a OLE Messaging Library installed. I'm
trying to send mail by declaring MAPISendMail function, which should work
without any libraries installed except of those which come with Windows
itself (something like MAPI.dll)
Cheers, Taras
Post by Mike Gagnon
http://support.microsoft.com/kb/q146641/
Post by Taras Kolakovic
Hi!
I'm trying to send E-mail from FoxPro using Simple MAPI directly without
any
Post by Taras Kolakovic
ocx controls.
Does anybody have any useful examples how to declare and then call
MAPISendMail function? The main problem seems to be that this function
has
Post by Mike Gagnon
Post by Taras Kolakovic
type structures as input parameters, which can't be declared in FoxPro.
Other problem is that i don't know how to declare it, is it the same as
from
Post by Taras Kolakovic
Visual Basic?
Regards,
Taras
Taras Kolakovic
2005-01-19 06:34:15 UTC
Permalink
This example looks OK, but it uses MAPISendMail class, which is only
available for members. I'm currently on a tight budget, so i was hoping for
some free stuff...

Thanx, anyway

Peace, T
Post by Mike Gagnon
http://www.news2news.com/vfp/?example=343
Post by Taras Kolakovic
Thanx for your answer, Mike, but this is not exactly what i was looking
for.
Post by Taras Kolakovic
It looks like this method also needs a OLE Messaging Library installed.
I'm
Post by Taras Kolakovic
trying to send mail by declaring MAPISendMail function, which should work
without any libraries installed except of those which come with Windows
itself (something like MAPI.dll)
Cheers, Taras
Post by Mike Gagnon
http://support.microsoft.com/kb/q146641/
Post by Taras Kolakovic
Hi!
I'm trying to send E-mail from FoxPro using Simple MAPI directly
without
Post by Taras Kolakovic
Post by Mike Gagnon
any
Post by Taras Kolakovic
ocx controls.
Does anybody have any useful examples how to declare and then call
MAPISendMail function? The main problem seems to be that this function
has
Post by Mike Gagnon
Post by Taras Kolakovic
type structures as input parameters, which can't be declared in
FoxPro.
Post by Taras Kolakovic
Post by Mike Gagnon
Post by Taras Kolakovic
Other problem is that i don't know how to declare it, is it the same
as
Post by Taras Kolakovic
Post by Mike Gagnon
from
Post by Taras Kolakovic
Visual Basic?
Regards,
Taras
Jan Bucek
2005-01-19 07:37:21 UTC
Permalink
Post by Taras Kolakovic
This example looks OK, but it uses MAPISendMail class, which is only
available for members. I'm currently on a tight budget, so i was hoping for
some free stuff...
Try MAPImail class from www.nbcsoftware.com , it is free and working O.K.
Post by Taras Kolakovic
Thanx, anyway
Peace, T
Post by Mike Gagnon
http://www.news2news.com/vfp/?example=343
Post by Taras Kolakovic
Thanx for your answer, Mike, but this is not exactly what i was looking
for.
Post by Taras Kolakovic
It looks like this method also needs a OLE Messaging Library installed.
I'm
Post by Taras Kolakovic
trying to send mail by declaring MAPISendMail function, which should
work
Post by Mike Gagnon
Post by Taras Kolakovic
without any libraries installed except of those which come with Windows
itself (something like MAPI.dll)
Cheers, Taras
Post by Mike Gagnon
http://support.microsoft.com/kb/q146641/
Post by Taras Kolakovic
Hi!
I'm trying to send E-mail from FoxPro using Simple MAPI directly
without
Post by Taras Kolakovic
Post by Mike Gagnon
any
Post by Taras Kolakovic
ocx controls.
Does anybody have any useful examples how to declare and then call
MAPISendMail function? The main problem seems to be that this
function
Post by Mike Gagnon
Post by Taras Kolakovic
has
Post by Mike Gagnon
Post by Taras Kolakovic
type structures as input parameters, which can't be declared in
FoxPro.
Post by Taras Kolakovic
Post by Mike Gagnon
Post by Taras Kolakovic
Other problem is that i don't know how to declare it, is it the same
as
Post by Taras Kolakovic
Post by Mike Gagnon
from
Post by Taras Kolakovic
Visual Basic?
Regards,
Taras
Taras Kolakovic
2005-01-19 08:42:46 UTC
Permalink
Unfortuntelly this link doesn't work in my browser (ie 6.0).
Post by Jan Bucek
Post by Taras Kolakovic
This example looks OK, but it uses MAPISendMail class, which is only
available for members. I'm currently on a tight budget, so i was hoping for
some free stuff...
Try MAPImail class from www.nbcsoftware.com , it is free and working O.K.
Post by Taras Kolakovic
Thanx, anyway
Peace, T
Post by Mike Gagnon
http://www.news2news.com/vfp/?example=343
Post by Taras Kolakovic
Thanx for your answer, Mike, but this is not exactly what i was looking
for.
Post by Taras Kolakovic
It looks like this method also needs a OLE Messaging Library installed.
I'm
Post by Taras Kolakovic
trying to send mail by declaring MAPISendMail function, which should
work
Post by Mike Gagnon
Post by Taras Kolakovic
without any libraries installed except of those which come with Windows
itself (something like MAPI.dll)
Cheers, Taras
Post by Mike Gagnon
http://support.microsoft.com/kb/q146641/
Post by Taras Kolakovic
Hi!
I'm trying to send E-mail from FoxPro using Simple MAPI directly
without
Post by Taras Kolakovic
Post by Mike Gagnon
any
Post by Taras Kolakovic
ocx controls.
Does anybody have any useful examples how to declare and then call
MAPISendMail function? The main problem seems to be that this
function
Post by Mike Gagnon
Post by Taras Kolakovic
has
Post by Mike Gagnon
Post by Taras Kolakovic
type structures as input parameters, which can't be declared in
FoxPro.
Post by Taras Kolakovic
Post by Mike Gagnon
Post by Taras Kolakovic
Other problem is that i don't know how to declare it, is it the same
as
Post by Taras Kolakovic
Post by Mike Gagnon
from
Post by Taras Kolakovic
Visual Basic?
Regards,
Taras
Jan Bucek
2005-01-19 09:42:48 UTC
Permalink
Post by Taras Kolakovic
Unfortuntelly this link doesn't work in my browser (ie 6.0).
??? Just tried with Firefox (my default) and IE6, both working. Anyway,
if you don't succeed contact me thru my www.bucek.info and I send you a
copy of it.
HTH
Post by Taras Kolakovic
Post by Jan Bucek
Post by Taras Kolakovic
This example looks OK, but it uses MAPISendMail class, which is only
available for members. I'm currently on a tight budget, so i was hoping
for
Post by Jan Bucek
Post by Taras Kolakovic
some free stuff...
Try MAPImail class from www.nbcsoftware.com , it is free and working O.K.
Taras Kolakovic
2005-01-20 06:25:26 UTC
Permalink
I tried it at home and it worked. But unfortunatelly this also isn't what i
was looking for, because this class requires MAPI ActiveX controls to be
installed (which are a wrapper for MAPISendMail function). I would like to
address MAPISendMail directly.

Cheers, Taras
Post by Jan Bucek
Post by Taras Kolakovic
Unfortuntelly this link doesn't work in my browser (ie 6.0).
??? Just tried with Firefox (my default) and IE6, both working. Anyway,
if you don't succeed contact me thru my www.bucek.info and I send you a
copy of it.
HTH
Post by Taras Kolakovic
Post by Jan Bucek
Post by Taras Kolakovic
This example looks OK, but it uses MAPISendMail class, which is only
available for members. I'm currently on a tight budget, so i was hoping
for
Post by Jan Bucek
Post by Taras Kolakovic
some free stuff...
Try MAPImail class from www.nbcsoftware.com , it is free and working O.K.
Mike Gagnon
2005-02-07 10:31:30 UTC
Permalink
This is how to declare it in FoxPro

DECLARE INTEGER MAPISendMail IN mapi32;
INTEGER lhSession, INTEGER ulUIParam, STRING @lpMessage,;
INTEGER flFlags, INTEGER ulReserved
Post by Taras Kolakovic
I tried it at home and it worked. But unfortunatelly this also isn't what i
was looking for, because this class requires MAPI ActiveX controls to be
installed (which are a wrapper for MAPISendMail function). I would like to
address MAPISendMail directly.
Cheers, Taras
Post by Jan Bucek
Post by Taras Kolakovic
Unfortuntelly this link doesn't work in my browser (ie 6.0).
??? Just tried with Firefox (my default) and IE6, both working. Anyway,
if you don't succeed contact me thru my www.bucek.info and I send you a
copy of it.
HTH
Post by Taras Kolakovic
Post by Jan Bucek
Post by Taras Kolakovic
This example looks OK, but it uses MAPISendMail class, which is only
available for members. I'm currently on a tight budget, so i was hoping
for
Post by Jan Bucek
Post by Taras Kolakovic
some free stuff...
Try MAPImail class from www.nbcsoftware.com , it is free and working
O.K.
Taras Kolakovic
2005-02-14 09:00:31 UTC
Permalink
Declaration itself is not that difficult, the hard part is the usage. The
main problem is @lpMessage parameter, it has to be a stream of data for a
complicated type structure. Since foxpro doesn't support type structures, it
has to be a string.

How to create this string is what i can't figure out.
Post by Mike Gagnon
This is how to declare it in FoxPro
DECLARE INTEGER MAPISendMail IN mapi32;
INTEGER flFlags, INTEGER ulReserved
Post by Taras Kolakovic
I tried it at home and it worked. But unfortunatelly this also isn't what i
was looking for, because this class requires MAPI ActiveX controls to be
installed (which are a wrapper for MAPISendMail function). I would like to
address MAPISendMail directly.
Cheers, Taras
Post by Jan Bucek
Post by Taras Kolakovic
Unfortuntelly this link doesn't work in my browser (ie 6.0).
??? Just tried with Firefox (my default) and IE6, both working. Anyway,
if you don't succeed contact me thru my www.bucek.info and I send you a
copy of it.
HTH
Post by Taras Kolakovic
Post by Jan Bucek
Post by Taras Kolakovic
This example looks OK, but it uses MAPISendMail class, which is only
available for members. I'm currently on a tight budget, so i was hoping
for
Post by Jan Bucek
Post by Taras Kolakovic
some free stuff...
Try MAPImail class from www.nbcsoftware.com , it is free and working
O.K.
Michael Drozdov
2005-02-14 10:12:44 UTC
Permalink
Hi, Taras.
Post by Taras Kolakovic
Declaration itself is not that difficult, the hard part is the usage. The
complicated type structure. Since foxpro doesn't support type structures, it
has to be a string.
see
- http://support.microsoft.com/default.aspx?scid=kb;en-us;194576 - How To
Obtain Time Zone Information in Visual FoxPro
- http://support.microsoft.com/default.aspx?scid=kb;en-us;188977 - HOWTO:
Use the Win32 API to Access File Dates and Times
- On http://www.universalthread.com/ Struct.zip by Christof Lange which
allows to do it
- ...\Samples\Solution\Winapi\Systime.scx - Use API Functions that Require a
STRUCT Sample
- ...\Samples\Solution\Winapi\Syscolor.scx - Use API Functions That Require
Pointers to Arrays Sample

Best regards.
íÉÈÁÉÌ äÒÏÚÄÏ×, é÷ó óÏÆÔ, ðÅÒÍØ, òÏÓÓÉÑ
[Michael Drozdov, ICS Soft, Perm, Russia]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
My Page: http://vfpdev.narod.ru/
ICS Page: http://www.ics.perm.ru/ [on Russian]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mike Gagnon
2005-02-14 10:24:54 UTC
Permalink
I sent you an e-mail
Post by Taras Kolakovic
Declaration itself is not that difficult, the hard part is the usage. The
complicated type structure. Since foxpro doesn't support type structures, it
has to be a string.
How to create this string is what i can't figure out.
Post by Mike Gagnon
This is how to declare it in FoxPro
DECLARE INTEGER MAPISendMail IN mapi32;
INTEGER flFlags, INTEGER ulReserved
Post by Taras Kolakovic
I tried it at home and it worked. But unfortunatelly this also isn't
what
i
Post by Mike Gagnon
Post by Taras Kolakovic
was looking for, because this class requires MAPI ActiveX controls to be
installed (which are a wrapper for MAPISendMail function). I would like
to
Post by Mike Gagnon
Post by Taras Kolakovic
address MAPISendMail directly.
Cheers, Taras
Post by Jan Bucek
Post by Taras Kolakovic
Unfortuntelly this link doesn't work in my browser (ie 6.0).
??? Just tried with Firefox (my default) and IE6, both working. Anyway,
if you don't succeed contact me thru my www.bucek.info and I send you a
copy of it.
HTH
Post by Taras Kolakovic
Post by Jan Bucek
Post by Taras Kolakovic
This example looks OK, but it uses MAPISendMail class, which is only
available for members. I'm currently on a tight budget, so i was hoping
for
Post by Jan Bucek
Post by Taras Kolakovic
some free stuff...
Try MAPImail class from www.nbcsoftware.com , it is free and working
O.K.
Taras Kolakovic
2005-02-14 13:30:13 UTC
Permalink
Thanx! That's exactly what i was looking for!

Cheers, Taras
Post by Mike Gagnon
I sent you an e-mail
Post by Taras Kolakovic
Declaration itself is not that difficult, the hard part is the usage. The
complicated type structure. Since foxpro doesn't support type
structures,
Post by Mike Gagnon
Post by Taras Kolakovic
it
has to be a string.
How to create this string is what i can't figure out.
Post by Mike Gagnon
This is how to declare it in FoxPro
DECLARE INTEGER MAPISendMail IN mapi32;
INTEGER flFlags, INTEGER ulReserved
Post by Taras Kolakovic
I tried it at home and it worked. But unfortunatelly this also isn't
what
i
Post by Mike Gagnon
Post by Taras Kolakovic
was looking for, because this class requires MAPI ActiveX controls to be
installed (which are a wrapper for MAPISendMail function). I would like
to
Post by Mike Gagnon
Post by Taras Kolakovic
address MAPISendMail directly.
Cheers, Taras
Post by Jan Bucek
Post by Taras Kolakovic
Unfortuntelly this link doesn't work in my browser (ie 6.0).
??? Just tried with Firefox (my default) and IE6, both working. Anyway,
if you don't succeed contact me thru my www.bucek.info and I send
you
Post by Mike Gagnon
Post by Taras Kolakovic
Post by Mike Gagnon
Post by Taras Kolakovic
Post by Jan Bucek
a
copy of it.
HTH
Post by Taras Kolakovic
Post by Jan Bucek
Post by Taras Kolakovic
This example looks OK, but it uses MAPISendMail class, which is only
available for members. I'm currently on a tight budget, so i was hoping
for
Post by Jan Bucek
Post by Taras Kolakovic
some free stuff...
Try MAPImail class from www.nbcsoftware.com , it is free and working
O.K.
Mike Gagnon
2005-02-14 13:57:48 UTC
Permalink
You are welcome.
Post by Taras Kolakovic
Thanx! That's exactly what i was looking for!
Cheers, Taras
Post by Mike Gagnon
I sent you an e-mail
Post by Taras Kolakovic
Declaration itself is not that difficult, the hard part is the usage.
The
for
Post by Taras Kolakovic
a
Post by Mike Gagnon
Post by Taras Kolakovic
complicated type structure. Since foxpro doesn't support type
structures,
Post by Mike Gagnon
Post by Taras Kolakovic
it
has to be a string.
How to create this string is what i can't figure out.
Post by Mike Gagnon
This is how to declare it in FoxPro
DECLARE INTEGER MAPISendMail IN mapi32;
INTEGER flFlags, INTEGER ulReserved
Post by Taras Kolakovic
I tried it at home and it worked. But unfortunatelly this also isn't
what
i
Post by Mike Gagnon
Post by Taras Kolakovic
was looking for, because this class requires MAPI ActiveX controls
to
Post by Taras Kolakovic
Post by Mike Gagnon
Post by Taras Kolakovic
Post by Mike Gagnon
Post by Taras Kolakovic
be
installed (which are a wrapper for MAPISendMail function). I would
like
Post by Mike Gagnon
Post by Taras Kolakovic
to
Post by Mike Gagnon
Post by Taras Kolakovic
address MAPISendMail directly.
Cheers, Taras
Post by Jan Bucek
Post by Taras Kolakovic
Unfortuntelly this link doesn't work in my browser (ie 6.0).
??? Just tried with Firefox (my default) and IE6, both working. Anyway,
if you don't succeed contact me thru my www.bucek.info and I send
you
Post by Mike Gagnon
Post by Taras Kolakovic
Post by Mike Gagnon
Post by Taras Kolakovic
Post by Jan Bucek
a
copy of it.
HTH
Post by Taras Kolakovic
Post by Jan Bucek
Post by Taras Kolakovic
This example looks OK, but it uses MAPISendMail class, which is only
available for members. I'm currently on a tight budget, so i
was
Post by Taras Kolakovic
Post by Mike Gagnon
Post by Taras Kolakovic
Post by Mike Gagnon
Post by Taras Kolakovic
Post by Jan Bucek
Post by Taras Kolakovic
Post by Jan Bucek
Post by Taras Kolakovic
hoping
for
Post by Jan Bucek
Post by Taras Kolakovic
some free stuff...
Try MAPImail class from www.nbcsoftware.com , it is free and
working
Post by Mike Gagnon
Post by Taras Kolakovic
Post by Mike Gagnon
Post by Taras Kolakovic
O.K.
Loading...