Results 1 to 6 of 6

Thread: HELP! MAPIMessages, only works for one person

  1. #1

    Thread Starter
    Member
    Join Date
    May 1999
    Location
    St. Louis, MO, USA
    Posts
    54

    Post

    I'm trying to write code-using MAPImessages so that under certain conditions in my app. will send an e-mail.

    First:
    How can I send a message to multiple people? Outlook complains if I assign two names separated by ; and a space. It still sees it as one name/address?

    Second:
    can anyone tell me why If I use recipAddress the message can not be delivered. However if I assign the address to the RecipDisplayName it works fine.

    Third:
    If the message is going to someone within our network I can not use an e-mail address but must use his or her full name.

    Any Help would be greatly appreciated.
    Thanks
    Jennifer


    ------------------

  2. #2
    Junior Member
    Join Date
    Feb 2000
    Location
    Dallas,Tx,USA
    Posts
    30

    Post

    Originally posted by Jennifer_R:
    I'm trying to write code-using MAPImessages so that under certain conditions in my app. will send an e-mail.

    First:
    How can I send a message to multiple people? Outlook complains if I assign two names separated by ; and a space. It still sees it as one name/address?

    Second:
    can anyone tell me why If I use recipAddress the message can not be delivered. However if I assign the address to the RecipDisplayName it works fine.

    Third:
    If the message is going to someone within our network I can not use an e-mail address but must use his or her full name.

    Any Help would be greatly appreciated.
    Thanks
    Jennifer


    Try this if u have not

    with mapmess

    .Show False
    .ResolveName
    .AddressResolveUI = True
    end with


    Also make sure that you mapi is working correctly go to microsoft word and select send to.

  3. #3

    Thread Starter
    Member
    Join Date
    May 1999
    Location
    St. Louis, MO, USA
    Posts
    54

    Post

    Thank you for your help. I have finaly found the answer to my first question. How to e-mail multiple people. You must incriment the recipindex then enter another display name. see example.

    Private Sub CmdSendMail_Click()

    MAPISession1.LogonUI = True
    MAPISession1.SignOn
    MAPIMessages1.SessionID = Me.MAPISession1.SessionID
    MAPIMessages1.Compose
    MAPIMessages1.MsgSubject = "Testing Auto e-mail"
    MAPIMessages1.MsgNoteText = "This is the body of the email"
    MAPIMessages1.RecipDisplayName = "First Recipient"
    'incriment RecipIndex
    MAPIMessages1.RecipIndex = MAPIMessages1.RecipIndex + 1
    'add second person
    MAPIMessages1.RecipDisplayName = "Secon Recipient"
    MAPIMessages1.Send (True)
    MAPISession1.SignOff

    End Sub


    ------------------

  4. #4
    Junior Member
    Join Date
    Feb 2000
    Location
    Dallas,Tx,USA
    Posts
    30

    Post

    yes the same applies to multiple attachments.. u must set the attachment index....


    Later
    The Man

  5. #5
    Addicted Member
    Join Date
    Jul 1999
    Location
    Portland, OR.
    Posts
    226

    Post

    Hi Jennifer_R.

    Check out this post. I think it contains more than what you are looking for!
    http://www.planet-source-code.com/vb...txtCodeId=6056

    Please let me know your findings.

    Good Luck.

  6. #6
    Hyperactive Member Steve Stunning's Avatar
    Join Date
    Jul 1999
    Location
    Fairfax, Virginia
    Posts
    314
    Greetings and Salutations,

    Jennifer_R ,

    The code worked great.

    Thanks!!
    Steve Stunning

Posting Permissions

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



Click Here to Expand Forum to Full Width