Results 1 to 5 of 5
  1. #1
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Mapi - ccMail (VB6)

    Am I missing something or do the Mapi Session/Messages controls not support the ccMail box for Outlook Express ?

    I would like to leave Recipient blank, and populate ccMail only, giving the user choice as to who to send to, while ccMail always defaulting to me.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Mapi - ccMail (VB6)

    When you set a recipient, you can specify the RecipType property. This will only work when MsgIndex = -1, i.e. when you are building a new outgoing message. RecipType can be set to the following values:
    mapToList = recipient in "To" box
    mapCcList = recipient in "Cc" box
    mapBccList = recipient in "Bcc" box

    Something like

    With mapMsg
    .Compose
    .MsgIndex = -1
    .RecipIndex = 0
    .RecipDisplayName = "Bill Gates"
    .RecipAddress = "billg@microsoft.com"
    .RecipType = mapCcList
    ' more code here
    .Send
    End With

  3. #3
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mapi - ccMail (VB6)

    Hans

    I thought I could do this another way:

    <pre> With MAPIMessages1
    .SessionID = MAPISession1.SessionID
    .Compose
    .MsgIndex = -1
    .RecipIndex = 0
    .RecipDisplayName = "Body Shop Control"
    .RecipAddress = "Diane@mm.co.uk" & "Dave@mm.co.uk"
    .RecipType = mapToList
    .MsgSubject = "Images For Job No: " & JN
    .MsgNoteText = Space(2) & vbCrLf & "Images Exported From Workshop "
    .Send True</pre>


    This way, without using the cc box the .RecipDisplayName supposedly masks who the mail is being sent to, but I get "Mail Delivery SubSystem"
    "The Address had errors ........"
    I tried separating the address's with a comma with the same result.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Mapi - ccMail (VB6)

    Hi Dave,

    Try this:

    With MAPIMessages1
    .SessionID = MAPISession1.SessionID
    .Compose
    .MsgSubject = "Images For Job No: " & JN
    .RecipIndex = 0
    .RecipAddress = "Diane@mm.co.uk"
    .RecipType = mapToList
    .RecipIndex = 1
    .RecipAddress = "Dave@mm.co.uk"
    .RecipType = mapCcList
    .MsgNoteText = Space(2) & vbCrLf & "Images Exported From Workshop"
    .Send True
    End With

  5. #5
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mapi - ccMail (VB6)

    Thanks again Hans.

    This did it:

    <pre> With MAPIMessages1
    .SessionID = MAPISession1.SessionID
    .Compose

    .MsgSubject = "Images For Job No: " & JN
    .RecipIndex = 0
    .RecipDisplayName = "Body Shop Control"
    .RecipAddress = "Diane@mm.co.uk"
    .RecipType = mapToList
    .RecipIndex = 1
    .RecipDisplayName = "."
    .RecipAddress = "Dave@mm.co.uk"
    .RecipType = mapCcList
    .MsgNoteText = Space(2) & vbCrLf & "Images Exported From Workshop"
    .Send True
    End With</pre>


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •