Skip to main content

[archive] Problems with CobolMail and email.exe

  • March 29, 2004
  • 36 replies
  • 0 views

[Migrated content. Thread originally posted on 28 March 2004]

I have downloaded both of these and tried to use them with no success so far. The error I get on both is 15 - bad recipient type. I found on Microsoft's developers web site that the valid codes for a recipient are 1 for To:, 2 for CC:, and 3 for BCC:. I can't see where this is set in these programs though. Am I overlooking something too obvious? I am just using one of my own e-mail addresses, rscheck@edctechnology.com. I see where someone else had this same problem earler, but I could not find the resolution.
This would also be a nice feature if I could allow the person to copy or blind copy other recipients. Has anyone been able to find where on Microsoft's web site it explains this further?
Thanks to anyone who can point me in the right direction!

36 replies

[Migrated content. Thread originally posted on 28 March 2004]

I have downloaded both of these and tried to use them with no success so far. The error I get on both is 15 - bad recipient type. I found on Microsoft's developers web site that the valid codes for a recipient are 1 for To:, 2 for CC:, and 3 for BCC:. I can't see where this is set in these programs though. Am I overlooking something too obvious? I am just using one of my own e-mail addresses, rscheck@edctechnology.com. I see where someone else had this same problem earler, but I could not find the resolution.
This would also be a nice feature if I could allow the person to copy or blind copy other recipients. Has anyone been able to find where on Microsoft's web site it explains this further?
Thanks to anyone who can point me in the right direction!
There are so many source examples around, it would be much easier to help if you could provide a small test case of yours together with your question.
And, remember, small is beautiful. The smaller the example, the easier to get help.

[Migrated content. Thread originally posted on 28 March 2004]

I have downloaded both of these and tried to use them with no success so far. The error I get on both is 15 - bad recipient type. I found on Microsoft's developers web site that the valid codes for a recipient are 1 for To:, 2 for CC:, and 3 for BCC:. I can't see where this is set in these programs though. Am I overlooking something too obvious? I am just using one of my own e-mail addresses, rscheck@edctechnology.com. I see where someone else had this same problem earler, but I could not find the resolution.
This would also be a nice feature if I could allow the person to copy or blind copy other recipients. Has anyone been able to find where on Microsoft's web site it explains this further?
Thanks to anyone who can point me in the right direction!
Sorry, I didn't realize.
That's quite a chore...trying to include enough without including too much? But here is my attempt attached. It appears to work fine except when I get to :

CALL "MAPISendMail" USING
BY VALUE MAPI-SESSION-HANDLE
BY VALUE H-ACU-WND
BY VALUE MAPI-MESSAGE-PTR
BY VALUE PREFERRED-SEND
BY VALUE MAPI-RESERVED-NULL
GIVING MAPI-RESULT
ON EXCEPTION STOP RUN.

MAPI-RESULT is 15.

It appears to me from reading the MSDN web site that it means that the recipient type is not 1, 2, or 3. But I don't see how to set that. And it would be a nice thing to set for CC: and BCC: also.

[Migrated content. Thread originally posted on 28 March 2004]

I have downloaded both of these and tried to use them with no success so far. The error I get on both is 15 - bad recipient type. I found on Microsoft's developers web site that the valid codes for a recipient are 1 for To:, 2 for CC:, and 3 for BCC:. I can't see where this is set in these programs though. Am I overlooking something too obvious? I am just using one of my own e-mail addresses, rscheck@edctechnology.com. I see where someone else had this same problem earler, but I could not find the resolution.
This would also be a nice feature if I could allow the person to copy or blind copy other recipients. Has anyone been able to find where on Microsoft's web site it explains this further?
Thanks to anyone who can point me in the right direction!
Sorry, I didn't realize.
That's quite a chore...trying to include enough without including too much? But here is my attempt attached. It appears to work fine except when I get to :

CALL "MAPISendMail" USING
BY VALUE MAPI-SESSION-HANDLE
BY VALUE H-ACU-WND
BY VALUE MAPI-MESSAGE-PTR
BY VALUE PREFERRED-SEND
BY VALUE MAPI-RESERVED-NULL
GIVING MAPI-RESULT
ON EXCEPTION STOP RUN.

MAPI-RESULT is 15.

It appears to me from reading the MSDN web site that it means that the recipient type is not 1, 2, or 3. But I don't see how to set that. And it would be a nice thing to set for CC: and BCC: also.

[Migrated content. Thread originally posted on 28 March 2004]

I have downloaded both of these and tried to use them with no success so far. The error I get on both is 15 - bad recipient type. I found on Microsoft's developers web site that the valid codes for a recipient are 1 for To:, 2 for CC:, and 3 for BCC:. I can't see where this is set in these programs though. Am I overlooking something too obvious? I am just using one of my own e-mail addresses, rscheck@edctechnology.com. I see where someone else had this same problem earler, but I could not find the resolution.
This would also be a nice feature if I could allow the person to copy or blind copy other recipients. Has anyone been able to find where on Microsoft's web site it explains this further?
Thanks to anyone who can point me in the right direction!
Sorry, I didn't realize.
That's quite a chore...trying to include enough without including too much? But here is my attempt attached. It appears to work fine except when I get to :

CALL "MAPISendMail" USING
BY VALUE MAPI-SESSION-HANDLE
BY VALUE H-ACU-WND
BY VALUE MAPI-MESSAGE-PTR
BY VALUE PREFERRED-SEND
BY VALUE MAPI-RESERVED-NULL
GIVING MAPI-RESULT
ON EXCEPTION STOP RUN.

MAPI-RESULT is 15.

It appears to me from reading the MSDN web site that it means that the recipient type is not 1, 2, or 3. But I don't see how to set that. And it would be a nice thing to set for CC: and BCC: also.

[Migrated content. Thread originally posted on 28 March 2004]

I have downloaded both of these and tried to use them with no success so far. The error I get on both is 15 - bad recipient type. I found on Microsoft's developers web site that the valid codes for a recipient are 1 for To:, 2 for CC:, and 3 for BCC:. I can't see where this is set in these programs though. Am I overlooking something too obvious? I am just using one of my own e-mail addresses, rscheck@edctechnology.com. I see where someone else had this same problem earler, but I could not find the resolution.
This would also be a nice feature if I could allow the person to copy or blind copy other recipients. Has anyone been able to find where on Microsoft's web site it explains this further?
Thanks to anyone who can point me in the right direction!
It appears when I went to preview reply it didn't keep the attachment? So here is another try WITH the attached program.

[Migrated content. Thread originally posted on 28 March 2004]

I have downloaded both of these and tried to use them with no success so far. The error I get on both is 15 - bad recipient type. I found on Microsoft's developers web site that the valid codes for a recipient are 1 for To:, 2 for CC:, and 3 for BCC:. I can't see where this is set in these programs though. Am I overlooking something too obvious? I am just using one of my own e-mail addresses, rscheck@edctechnology.com. I see where someone else had this same problem earler, but I could not find the resolution.
This would also be a nice feature if I could allow the person to copy or blind copy other recipients. Has anyone been able to find where on Microsoft's web site it explains this further?
Thanks to anyone who can point me in the right direction!
Before I look at this, may I ask why you would use the API directly instead of the MSMapi32.ocx wrapper. The latter is significantly easier to work with.
Would you consider that?

[Migrated content. Thread originally posted on 28 March 2004]

I have downloaded both of these and tried to use them with no success so far. The error I get on both is 15 - bad recipient type. I found on Microsoft's developers web site that the valid codes for a recipient are 1 for To:, 2 for CC:, and 3 for BCC:. I can't see where this is set in these programs though. Am I overlooking something too obvious? I am just using one of my own e-mail addresses, rscheck@edctechnology.com. I see where someone else had this same problem earler, but I could not find the resolution.
This would also be a nice feature if I could allow the person to copy or blind copy other recipients. Has anyone been able to find where on Microsoft's web site it explains this further?
Thanks to anyone who can point me in the right direction!
I started working with the API directory because that is the solution I ran across first. I am also working on a program that uses the MSMAPI32.OCX, but that doesn't work for me either. It runs fine, but never sends the e-mail. So I hoped to gain a better understanding of MAPI by directly working with it. I thought then I would be able to figure out why the ocx solution doesn't work. And help me to resolve any problems I run across in the future.

[Migrated content. Thread originally posted on 28 March 2004]

I have downloaded both of these and tried to use them with no success so far. The error I get on both is 15 - bad recipient type. I found on Microsoft's developers web site that the valid codes for a recipient are 1 for To:, 2 for CC:, and 3 for BCC:. I can't see where this is set in these programs though. Am I overlooking something too obvious? I am just using one of my own e-mail addresses, rscheck@edctechnology.com. I see where someone else had this same problem earler, but I could not find the resolution.
This would also be a nice feature if I could allow the person to copy or blind copy other recipients. Has anyone been able to find where on Microsoft's web site it explains this further?
Thanks to anyone who can point me in the right direction!
I started working with the API directory because that is the solution I ran across first. I am also working on a program that uses the MSMAPI32.OCX, but that doesn't work for me either. It runs fine, but never sends the e-mail. So I hoped to gain a better understanding of MAPI by directly working with it. I thought then I would be able to figure out why the ocx solution doesn't work. And help me to resolve any problems I run across in the future.

[Migrated content. Thread originally posted on 28 March 2004]

I have downloaded both of these and tried to use them with no success so far. The error I get on both is 15 - bad recipient type. I found on Microsoft's developers web site that the valid codes for a recipient are 1 for To:, 2 for CC:, and 3 for BCC:. I can't see where this is set in these programs though. Am I overlooking something too obvious? I am just using one of my own e-mail addresses, rscheck@edctechnology.com. I see where someone else had this same problem earler, but I could not find the resolution.
This would also be a nice feature if I could allow the person to copy or blind copy other recipients. Has anyone been able to find where on Microsoft's web site it explains this further?
Thanks to anyone who can point me in the right direction!
I started working with the API directory because that is the solution I ran across first. I am also working on a program that uses the MSMAPI32.OCX, but that doesn't work for me either. It runs fine, but never sends the e-mail. So I hoped to gain a better understanding of MAPI by directly working with it. I thought then I would be able to figure out why the ocx solution doesn't work. And help me to resolve any problems I run across in the future.

[Migrated content. Thread originally posted on 28 March 2004]

I have downloaded both of these and tried to use them with no success so far. The error I get on both is 15 - bad recipient type. I found on Microsoft's developers web site that the valid codes for a recipient are 1 for To:, 2 for CC:, and 3 for BCC:. I can't see where this is set in these programs though. Am I overlooking something too obvious? I am just using one of my own e-mail addresses, rscheck@edctechnology.com. I see where someone else had this same problem earler, but I could not find the resolution.
This would also be a nice feature if I could allow the person to copy or blind copy other recipients. Has anyone been able to find where on Microsoft's web site it explains this further?
Thanks to anyone who can point me in the right direction!
Frankly,

I think we're both better off trying to figure the issues with the msmapi32.ocx rather than the API version. They are approaching the task from widely different angles, so I doubt understanding the one issue will simplify understanding the other.

Does your msmapi32 sample differ significantly from the one I have attached here, if so, may you try this one (of course given that you modify the email adresses) and does it work? If it doesn't we will take it from there.

What you have to modify is:


       MOVE    "Recipient name"  TO MY-RECIP-NAME.
       MOVE    "Recipient email"   TO MY-RECIP-ADDR.


If it does work. Look at it, compare it to yours and see if you can pinpoint the difference. If not, let me look at yours and we will see if we can make this work.

[Migrated content. Thread originally posted on 28 March 2004]

I have downloaded both of these and tried to use them with no success so far. The error I get on both is 15 - bad recipient type. I found on Microsoft's developers web site that the valid codes for a recipient are 1 for To:, 2 for CC:, and 3 for BCC:. I can't see where this is set in these programs though. Am I overlooking something too obvious? I am just using one of my own e-mail addresses, rscheck@edctechnology.com. I see where someone else had this same problem earler, but I could not find the resolution.
This would also be a nice feature if I could allow the person to copy or blind copy other recipients. Has anyone been able to find where on Microsoft's web site it explains this further?
Thanks to anyone who can point me in the right direction!
Yes, that is very similar to the code I was using. I change MY-RECIP-NAME and MY-RECIP-ADDR, and it appears to run thru the program successfully but the e-mail does not reach the mail server. I don't know how to debug this to find my problem, which is why I thought if I could get the direct API approach to work, I would discover my problem.

[Migrated content. Thread originally posted on 28 March 2004]

I have downloaded both of these and tried to use them with no success so far. The error I get on both is 15 - bad recipient type. I found on Microsoft's developers web site that the valid codes for a recipient are 1 for To:, 2 for CC:, and 3 for BCC:. I can't see where this is set in these programs though. Am I overlooking something too obvious? I am just using one of my own e-mail addresses, rscheck@edctechnology.com. I see where someone else had this same problem earler, but I could not find the resolution.
This would also be a nice feature if I could allow the person to copy or blind copy other recipients. Has anyone been able to find where on Microsoft's web site it explains this further?
Thanks to anyone who can point me in the right direction!
Strange, and you get no errors at all? Are you sure the Outlook is readily configured and operational on that computer?

[Migrated content. Thread originally posted on 28 March 2004]

I have downloaded both of these and tried to use them with no success so far. The error I get on both is 15 - bad recipient type. I found on Microsoft's developers web site that the valid codes for a recipient are 1 for To:, 2 for CC:, and 3 for BCC:. I can't see where this is set in these programs though. Am I overlooking something too obvious? I am just using one of my own e-mail addresses, rscheck@edctechnology.com. I see where someone else had this same problem earler, but I could not find the resolution.
This would also be a nice feature if I could allow the person to copy or blind copy other recipients. Has anyone been able to find where on Microsoft's web site it explains this further?
Thanks to anyone who can point me in the right direction!
Strange, and you get no errors at all? Are you sure the Outlook is readily configured and operational on that computer?

[Migrated content. Thread originally posted on 28 March 2004]

I have downloaded both of these and tried to use them with no success so far. The error I get on both is 15 - bad recipient type. I found on Microsoft's developers web site that the valid codes for a recipient are 1 for To:, 2 for CC:, and 3 for BCC:. I can't see where this is set in these programs though. Am I overlooking something too obvious? I am just using one of my own e-mail addresses, rscheck@edctechnology.com. I see where someone else had this same problem earler, but I could not find the resolution.
This would also be a nice feature if I could allow the person to copy or blind copy other recipients. Has anyone been able to find where on Microsoft's web site it explains this further?
Thanks to anyone who can point me in the right direction!
Strange, and you get no errors at all? Are you sure the Outlook is readily configured and operational on that computer?

[Migrated content. Thread originally posted on 28 March 2004]

I have downloaded both of these and tried to use them with no success so far. The error I get on both is 15 - bad recipient type. I found on Microsoft's developers web site that the valid codes for a recipient are 1 for To:, 2 for CC:, and 3 for BCC:. I can't see where this is set in these programs though. Am I overlooking something too obvious? I am just using one of my own e-mail addresses, rscheck@edctechnology.com. I see where someone else had this same problem earler, but I could not find the resolution.
This would also be a nice feature if I could allow the person to copy or blind copy other recipients. Has anyone been able to find where on Microsoft's web site it explains this further?
Thanks to anyone who can point me in the right direction!
Not Outlook, but I use Outlook Express and I can send and receive mail fine. I thought these would work with more clients than Outlook?

[Migrated content. Thread originally posted on 28 March 2004]

I have downloaded both of these and tried to use them with no success so far. The error I get on both is 15 - bad recipient type. I found on Microsoft's developers web site that the valid codes for a recipient are 1 for To:, 2 for CC:, and 3 for BCC:. I can't see where this is set in these programs though. Am I overlooking something too obvious? I am just using one of my own e-mail addresses, rscheck@edctechnology.com. I see where someone else had this same problem earler, but I could not find the resolution.
This would also be a nice feature if I could allow the person to copy or blind copy other recipients. Has anyone been able to find where on Microsoft's web site it explains this further?
Thanks to anyone who can point me in the right direction!
Can you check if Outlook Express is set to be the default email client?

[Migrated content. Thread originally posted on 28 March 2004]

I have downloaded both of these and tried to use them with no success so far. The error I get on both is 15 - bad recipient type. I found on Microsoft's developers web site that the valid codes for a recipient are 1 for To:, 2 for CC:, and 3 for BCC:. I can't see where this is set in these programs though. Am I overlooking something too obvious? I am just using one of my own e-mail addresses, rscheck@edctechnology.com. I see where someone else had this same problem earler, but I could not find the resolution.
This would also be a nice feature if I could allow the person to copy or blind copy other recipients. Has anyone been able to find where on Microsoft's web site it explains this further?
Thanks to anyone who can point me in the right direction!
Sorry, yes, I should have mentioned that. It is set as my default client. I have set it (and Netscape) to check to see it if it the default when it starts.

[Migrated content. Thread originally posted on 28 March 2004]

I have downloaded both of these and tried to use them with no success so far. The error I get on both is 15 - bad recipient type. I found on Microsoft's developers web site that the valid codes for a recipient are 1 for To:, 2 for CC:, and 3 for BCC:. I can't see where this is set in these programs though. Am I overlooking something too obvious? I am just using one of my own e-mail addresses, rscheck@edctechnology.com. I see where someone else had this same problem earler, but I could not find the resolution.
This would also be a nice feature if I could allow the person to copy or blind copy other recipients. Has anyone been able to find where on Microsoft's web site it explains this further?
Thanks to anyone who can point me in the right direction!
Sorry, yes, I should have mentioned that. It is set as my default client. I have set it (and Netscape) to check to see it if it the default when it starts.

[Migrated content. Thread originally posted on 28 March 2004]

I have downloaded both of these and tried to use them with no success so far. The error I get on both is 15 - bad recipient type. I found on Microsoft's developers web site that the valid codes for a recipient are 1 for To:, 2 for CC:, and 3 for BCC:. I can't see where this is set in these programs though. Am I overlooking something too obvious? I am just using one of my own e-mail addresses, rscheck@edctechnology.com. I see where someone else had this same problem earler, but I could not find the resolution.
This would also be a nice feature if I could allow the person to copy or blind copy other recipients. Has anyone been able to find where on Microsoft's web site it explains this further?
Thanks to anyone who can point me in the right direction!
Sorry, yes, I should have mentioned that. It is set as my default client. I have set it (and Netscape) to check to see it if it the default when it starts.

[Migrated content. Thread originally posted on 28 March 2004]

I have downloaded both of these and tried to use them with no success so far. The error I get on both is 15 - bad recipient type. I found on Microsoft's developers web site that the valid codes for a recipient are 1 for To:, 2 for CC:, and 3 for BCC:. I can't see where this is set in these programs though. Am I overlooking something too obvious? I am just using one of my own e-mail addresses, rscheck@edctechnology.com. I see where someone else had this same problem earler, but I could not find the resolution.
This would also be a nice feature if I could allow the person to copy or blind copy other recipients. Has anyone been able to find where on Microsoft's web site it explains this further?
Thanks to anyone who can point me in the right direction!
This is very strange indeed. I will try to see if I can reproduce this on any of my machines and determine the reason.

[Migrated content. Thread originally posted on 28 March 2004]

I have downloaded both of these and tried to use them with no success so far. The error I get on both is 15 - bad recipient type. I found on Microsoft's developers web site that the valid codes for a recipient are 1 for To:, 2 for CC:, and 3 for BCC:. I can't see where this is set in these programs though. Am I overlooking something too obvious? I am just using one of my own e-mail addresses, rscheck@edctechnology.com. I see where someone else had this same problem earler, but I could not find the resolution.
This would also be a nice feature if I could allow the person to copy or blind copy other recipients. Has anyone been able to find where on Microsoft's web site it explains this further?
Thanks to anyone who can point me in the right direction!
I've been playing around with VB 6 a bit and able to call a VB program to send email via SMTP, OUTLOOK, or MAPI. It took me a while to figure out how to do a BCC in MAPI. Even if you don't know VB, you may be able to read them. If you don't have the VB compiler, just view MAIL.CLS in a text editor.

[Migrated content. Thread originally posted on 28 March 2004]

I have downloaded both of these and tried to use them with no success so far. The error I get on both is 15 - bad recipient type. I found on Microsoft's developers web site that the valid codes for a recipient are 1 for To:, 2 for CC:, and 3 for BCC:. I can't see where this is set in these programs though. Am I overlooking something too obvious? I am just using one of my own e-mail addresses, rscheck@edctechnology.com. I see where someone else had this same problem earler, but I could not find the resolution.
This would also be a nice feature if I could allow the person to copy or blind copy other recipients. Has anyone been able to find where on Microsoft's web site it explains this further?
Thanks to anyone who can point me in the right direction!
Originally posted by RSoftcheck
Sorry, yes, I should have mentioned that. It is set as my default client. I have set it (and Netscape) to check to see it if it the default when it starts.


For what it is worth, I have been able to reproduce the behavior, I will see if I can find a solution to this.

[Migrated content. Thread originally posted on 28 March 2004]

I have downloaded both of these and tried to use them with no success so far. The error I get on both is 15 - bad recipient type. I found on Microsoft's developers web site that the valid codes for a recipient are 1 for To:, 2 for CC:, and 3 for BCC:. I can't see where this is set in these programs though. Am I overlooking something too obvious? I am just using one of my own e-mail addresses, rscheck@edctechnology.com. I see where someone else had this same problem earler, but I could not find the resolution.
This would also be a nice feature if I could allow the person to copy or blind copy other recipients. Has anyone been able to find where on Microsoft's web site it explains this further?
Thanks to anyone who can point me in the right direction!
Originally posted by RSoftcheck
Sorry, yes, I should have mentioned that. It is set as my default client. I have set it (and Netscape) to check to see it if it the default when it starts.


For what it is worth, I have been able to reproduce the behavior, I will see if I can find a solution to this.

[Migrated content. Thread originally posted on 28 March 2004]

I have downloaded both of these and tried to use them with no success so far. The error I get on both is 15 - bad recipient type. I found on Microsoft's developers web site that the valid codes for a recipient are 1 for To:, 2 for CC:, and 3 for BCC:. I can't see where this is set in these programs though. Am I overlooking something too obvious? I am just using one of my own e-mail addresses, rscheck@edctechnology.com. I see where someone else had this same problem earler, but I could not find the resolution.
This would also be a nice feature if I could allow the person to copy or blind copy other recipients. Has anyone been able to find where on Microsoft's web site it explains this further?
Thanks to anyone who can point me in the right direction!
Originally posted by RSoftcheck
Sorry, yes, I should have mentioned that. It is set as my default client. I have set it (and Netscape) to check to see it if it the default when it starts.


For what it is worth, I have been able to reproduce the behavior, I will see if I can find a solution to this.

[Migrated content. Thread originally posted on 28 March 2004]

I have downloaded both of these and tried to use them with no success so far. The error I get on both is 15 - bad recipient type. I found on Microsoft's developers web site that the valid codes for a recipient are 1 for To:, 2 for CC:, and 3 for BCC:. I can't see where this is set in these programs though. Am I overlooking something too obvious? I am just using one of my own e-mail addresses, rscheck@edctechnology.com. I see where someone else had this same problem earler, but I could not find the resolution.
This would also be a nice feature if I could allow the person to copy or blind copy other recipients. Has anyone been able to find where on Microsoft's web site it explains this further?
Thanks to anyone who can point me in the right direction!
Sorry this has taken some time. But there are tons of things to do, and obviously, I can't give 1st priority to the forum.

Nevertheless, I have finally succeeded in running the MSMAPI32 demo on my other machine where it failed with Outlook Express. But I still have some issues with it using Outlook 2002.

I am going to post some code here sometime today, code which I hope as many as possible could give me a hand test on whatever computers they have available to see if we finally found a procedure that works.

One note though, for those of us which has Outlook / Outlook Express with certain security patches, this is sort of annoying, in that you will get these dialog boxes up, asking if it is okay to send.

If you can't live with that, I am afraid smtp is the only alternative.