[Migrated content. Thread originally posted on 01 April 2003]
I have modified the acucobol email program that interfaces with microsofts Mapi.
everything works fine in-house but when I sent it to a customer using an older version of outlook he gets the MAPI message
"Bad recipient type" anyone know what causes that or how we could code to get around it.
Gents,
Reasonably, using the MSMapi is at a very lowlevel interface, and thus it is tricky to use.
The suggestion of using the MAILTO command is excellent, have in mind however, it is better used in conjunction with the web-browser component, just set the url to the instruction you are trying to shell.
I realize I probably have to put some effort into this. That is, I will see if I can find the time to use the MAPI control instead, in which case we don't have to struggle so much with the type controls.
The disadvantage of course with the MAPI, whether it is control or API is that it is a Windows only solution, and it requires that a mail system has been installed on that particular computer which supports the MAPI interface. Which brings my thoughts onto a new feature coming in the soon to be released 6.0 version:
C$SOCKET
With this feature and a smtp server at hand, you should be able to send emails on any platform, regardless og whether an email client are present or not.
Let me see what I can come up with.
[Migrated content. Thread originally posted on 01 April 2003]
I have modified the acucobol email program that interfaces with microsofts Mapi.
everything works fine in-house but when I sent it to a customer using an older version of outlook he gets the MAPI message
"Bad recipient type" anyone know what causes that or how we could code to get around it.
Gents,
Reasonably, using the MSMapi is at a very lowlevel interface, and thus it is tricky to use.
The suggestion of using the MAILTO command is excellent, have in mind however, it is better used in conjunction with the web-browser component, just set the url to the instruction you are trying to shell.
I realize I probably have to put some effort into this. That is, I will see if I can find the time to use the MAPI control instead, in which case we don't have to struggle so much with the type controls.
The disadvantage of course with the MAPI, whether it is control or API is that it is a Windows only solution, and it requires that a mail system has been installed on that particular computer which supports the MAPI interface. Which brings my thoughts onto a new feature coming in the soon to be released 6.0 version:
C$SOCKET
With this feature and a smtp server at hand, you should be able to send emails on any platform, regardless og whether an email client are present or not.
Let me see what I can come up with.
[Migrated content. Thread originally posted on 01 April 2003]
I have modified the acucobol email program that interfaces with microsofts Mapi.
everything works fine in-house but when I sent it to a customer using an older version of outlook he gets the MAPI message
"Bad recipient type" anyone know what causes that or how we could code to get around it.
Gents,
Reasonably, using the MSMapi is at a very lowlevel interface, and thus it is tricky to use.
The suggestion of using the MAILTO command is excellent, have in mind however, it is better used in conjunction with the web-browser component, just set the url to the instruction you are trying to shell.
I realize I probably have to put some effort into this. That is, I will see if I can find the time to use the MAPI control instead, in which case we don't have to struggle so much with the type controls.
The disadvantage of course with the MAPI, whether it is control or API is that it is a Windows only solution, and it requires that a mail system has been installed on that particular computer which supports the MAPI interface. Which brings my thoughts onto a new feature coming in the soon to be released 6.0 version:
C$SOCKET
With this feature and a smtp server at hand, you should be able to send emails on any platform, regardless og whether an email client are present or not.
Let me see what I can come up with.
[Migrated content. Thread originally posted on 01 April 2003]
I have modified the acucobol email program that interfaces with microsofts Mapi.
everything works fine in-house but when I sent it to a customer using an older version of outlook he gets the MAPI message
"Bad recipient type" anyone know what causes that or how we could code to get around it.
If you use the mailto protocol on a Windows system, you could use the ShellExecute function to execute the command.
Snippets of code are below to demonstrate.
In working storage define:
78 NEWLINE VALUE H"0A".
01 WS-OPERATION PIC X(255) VALUE SPACES.
01 WS-FILE PIC X(255) VALUE SPACES.
01 WS-PARAMETERS PIC X(255) VALUE SPACES.
01 WS-DIRECTORY PIC X(255) VALUE SPACES.
01 WS-SHOW-CMD USAGE UNSIGNED-LONG.
01 RETURN-VALUE USAGE UNSIGNED-LONG.
then in the procedure division you can set up a section to call the ShellExecute function such as:
CALL-SHELL-EXECUTE SECTION.
SET ENVIRONMENT "DLL-CONVENTION" TO 1.
CALL "SHELL32.DLL".
MOVE "Open" TO WS-OPERATION.
INSPECT WS-OPERATION REPLACING
TRAILING SPACES BY NULLS.
INSPECT WS-FILE REPLACING TRAILING SPACES BY NULLS.
MOVE SPACES TO WS-PARAMETERS WS-DIRECTORY.
INSPECT WS-PARAMETERS REPLACING
TRAILING SPACES BY NULLS.
INSPECT WS-DIRECTORY REPLACING
TRAILING SPACES BY NULLS.
SET WS-SHOW-CMD TO 1.
CALL "ShellExecuteA" USING BY VALUE H-ACU-WND
BY REFERENCE WS-OPERATION
BY REFERENCE WS-FILE BY REFERENCE WS-PARAMETERS
BY REFERENCE WS-DIRECTORY
WS-SHOW-CMD RETURNING RETURN-VALUE
ON EXCEPTION
DISPLAY MESSAGE BOX
"Unable to perform ShellExecuteA function." NEWLINE
"Return Value is " RETURN-VALUE TITLE "Function Error"
ICON MB-ERROR-ICON.
CANCEL "SHELL32.DLL".
CALL-SHELL-EXECUTE-EXIT.
EXIT.
then you can perform the CALL-SHELL-EXECUTE section from anywhere in your program by placing your mailto command into the WS-FILE variable and performing the section, for example:
MOVE "mailto:SGJ@DATAMANN.DK?subject=test file & body=body text " TO WS-FILE.
PERFORM CALL-SHELL-EXECUTE.
[Migrated content. Thread originally posted on 01 April 2003]
I have modified the acucobol email program that interfaces with microsofts Mapi.
everything works fine in-house but when I sent it to a customer using an older version of outlook he gets the MAPI message
"Bad recipient type" anyone know what causes that or how we could code to get around it.
Nice example!
[Migrated content. Thread originally posted on 01 April 2003]
I have modified the acucobol email program that interfaces with microsofts Mapi.
everything works fine in-house but when I sent it to a customer using an older version of outlook he gets the MAPI message
"Bad recipient type" anyone know what causes that or how we could code to get around it.
Nice example!
[Migrated content. Thread originally posted on 01 April 2003]
I have modified the acucobol email program that interfaces with microsofts Mapi.
everything works fine in-house but when I sent it to a customer using an older version of outlook he gets the MAPI message
"Bad recipient type" anyone know what causes that or how we could code to get around it.
Nice example!
[Migrated content. Thread originally posted on 01 April 2003]
I have modified the acucobol email program that interfaces with microsofts Mapi.
everything works fine in-house but when I sent it to a customer using an older version of outlook he gets the MAPI message
"Bad recipient type" anyone know what causes that or how we could code to get around it.
I downloaded the outlook example using MAPI
and it works great excepting fo the fact that you cant send
an attachment, I have tried using the Attachment property
but I get compile errors
How can I add at least 1 attachment
[Migrated content. Thread originally posted on 01 April 2003]
I have modified the acucobol email program that interfaces with microsofts Mapi.
everything works fine in-house but when I sent it to a customer using an older version of outlook he gets the MAPI message
"Bad recipient type" anyone know what causes that or how we could code to get around it.
I downloaded the outlook example using MAPI
and it works great excepting fo the fact that you cant send
an attachment, I have tried using the Attachment property
but I get compile errors
How can I add at least 1 attachment
[Migrated content. Thread originally posted on 01 April 2003]
I have modified the acucobol email program that interfaces with microsofts Mapi.
everything works fine in-house but when I sent it to a customer using an older version of outlook he gets the MAPI message
"Bad recipient type" anyone know what causes that or how we could code to get around it.
I downloaded the outlook example using MAPI
and it works great excepting fo the fact that you cant send
an attachment, I have tried using the Attachment property
but I get compile errors
How can I add at least 1 attachment
[Migrated content. Thread originally posted on 01 April 2003]
I have modified the acucobol email program that interfaces with microsofts Mapi.
everything works fine in-house but when I sent it to a customer using an older version of outlook he gets the MAPI message
"Bad recipient type" anyone know what causes that or how we could code to get around it.
Hello everybody.
Because I'am runing my company alone so I cannot asked a college a ask they hole worold for help.
In this thread there is a lot over sending email, but is there someone that can pass over some examples for reading the Inbox or can give some URL's where I can find it.
[Migrated content. Thread originally posted on 01 April 2003]
I have modified the acucobol email program that interfaces with microsofts Mapi.
everything works fine in-house but when I sent it to a customer using an older version of outlook he gets the MAPI message
"Bad recipient type" anyone know what causes that or how we could code to get around it.
Certainly,
but would you like to use Microsoft Office Outlook or MAPI?
[Migrated content. Thread originally posted on 01 April 2003]
I have modified the acucobol email program that interfaces with microsofts Mapi.
everything works fine in-house but when I sent it to a customer using an older version of outlook he gets the MAPI message
"Bad recipient type" anyone know what causes that or how we could code to get around it.
Certainly,
but would you like to use Microsoft Office Outlook or MAPI?
[Migrated content. Thread originally posted on 01 April 2003]
I have modified the acucobol email program that interfaces with microsofts Mapi.
everything works fine in-house but when I sent it to a customer using an older version of outlook he gets the MAPI message
"Bad recipient type" anyone know what causes that or how we could code to get around it.
Certainly,
but would you like to use Microsoft Office Outlook or MAPI?
[Migrated content. Thread originally posted on 01 April 2003]
I have modified the acucobol email program that interfaces with microsofts Mapi.
everything works fine in-house but when I sent it to a customer using an older version of outlook he gets the MAPI message
"Bad recipient type" anyone know what causes that or how we could code to get around it.
In the special-names I'am using
outlook.def and further I use by getnamespace "MAPI" like:
MODIFY OUTLOOK-HANDLE GETNAMESPACE("MAPI")
GIVING NAMESPACE-HANDLE.
[Migrated content. Thread originally posted on 01 April 2003]
I have modified the acucobol email program that interfaces with microsofts Mapi.
everything works fine in-house but when I sent it to a customer using an older version of outlook he gets the MAPI message
"Bad recipient type" anyone know what causes that or how we could code to get around it.
In the special-names I'am using
outlook.def and further I use by getnamespace "MAPI" like:
MODIFY OUTLOOK-HANDLE GETNAMESPACE("MAPI")
GIVING NAMESPACE-HANDLE.
[Migrated content. Thread originally posted on 01 April 2003]
I have modified the acucobol email program that interfaces with microsofts Mapi.
everything works fine in-house but when I sent it to a customer using an older version of outlook he gets the MAPI message
"Bad recipient type" anyone know what causes that or how we could code to get around it.
In the special-names I'am using
outlook.def and further I use by getnamespace "MAPI" like:
MODIFY OUTLOOK-HANDLE GETNAMESPACE("MAPI")
GIVING NAMESPACE-HANDLE.
[Migrated content. Thread originally posted on 01 April 2003]
I have modified the acucobol email program that interfaces with microsofts Mapi.
everything works fine in-house but when I sent it to a customer using an older version of outlook he gets the MAPI message
"Bad recipient type" anyone know what causes that or how we could code to get around it.
Very good, and what you would like to be able to is to read incoming mail.
I am off on vacation now and for the next two days, may be when I come back if there is time for it I can write an example.