Recipients do not receive your e-mail message when you set the Recipients.Type property to olOrignator (0) in Outlook 2003 or in Outlook 2002 (823917)



The information in this article applies to:

  • Microsoft Office Outlook 2003
  • Microsoft Outlook 2002

SYMPTOMS

When you programmatically send an e-mail message to more than one recipient, the recipients do not receive your e-mail message, and you receive an undeliverable e-mail message that is similar to the following:

Undeliverable: <subject>

Your message did not reach some or all of the intended recipients.

Subject: <subject text>
Sent: <date> <time>

The following recipient(s) could not be reached:

<e-mail address> on <date> <time>

This message could not be sent. Try sending the message again later, or contact your network administrator. Error is [0x80070057-00000000-00000000].

<e-mail address> on <date> <time>

This message could not be sent. Try sending the message again later, or contact your network administrator. Error is [0x80070057-00000000-00000000].

CAUSE

This behavior may occur when the Recipient .Type property is set to 0 for one or more of your recipients.

For example, this behavior may occur if you run a Microsoft Visual Basic for Applications (VBA) macro that is similar to the following example:
Sub TestTypeMailItem()

    Dim mai As MailItem
    Dim rcps As Recipients
    Dim rcp As Recipient
    
    Set mai = Application.CreateItem(olMailItem)
    mai.Subject = "Recipient.Type"
    Set rcps = mai.Recipients

    Set rcp = rcps.Add(Application.Session.CurrentUser.Name)
    rcp.Type = 0

    'Change "e-mail address" to a valid e-mail address.
    Set rcp = rcps.Add("e-mail address")
    rcp.Type = 1

    'Change "e-mail address" to a valid e-mail address.
    Set rcp = rcps.Add("e-mail address")
    rcp.Type = 0

    mai.Send

End Sub

RESOLUTION

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.

To resolve this behavior, change the Recipient .Type property for your recipients to one of the following properties:
  • Use Recipient. Type property 1 for recipients that are included in the To box of the e-mail message.
  • Use Recipient. Type property 2 for recipients that are included in the Cc box of the e-mail message.
  • Use Recipient Type property 3 for recipients that are included in the Bcc box of the e-mail message.
For example, change the Recipient .Type property in your VBA macro as demonstrated in the following sample code:
Sub TestTypeMailItem()

    Dim mai As MailItem
    Dim rcps As Recipients
    Dim rcp As Recipient
    
    Set mai = Application.CreateItem(olMailItem)
    mai.Subject = "Recipient.Type"
    Set rcps = mai.Recipients

    Set rcp = rcps.Add(Application.Session.CurrentUser.Name)
    rcp.Type = 1

    'Change "e-mail address" to a valid e-mail address.
    Set rcp = rcps.Add("e-mail address")
    rcp.Type = 2

    'Change "e-mail address" to a valid e-mail address.
    Set rcp = rcps.Add("e-mail address")
    rcp.Type = 3

    mai.Send

End Sub

Modification Type:MinorLast Reviewed:1/6/2006
Keywords:kberrmsg KbVBA kbsendmail kbemail kbpending kbprb KB823917 kbAudEndUser