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

Article translations Article translations
Article ID: 823917 - View products that this article applies to.
Expand all | Collapse all

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

Properties

Article ID: 823917 - Last Review: January 24, 2007 - Revision: 5.2
APPLIES TO
  • Microsoft Office Outlook 2003
  • Microsoft Outlook 2002 Standard Edition
  • Microsoft Office Outlook 2007
Keywords: 
kberrmsg kbvba kbsendmail kbemail kbpending kbprb KB823917

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com