Results 1 to 4 of 4

Thread: Problem with MAPI controls

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2000
    Location
    Virginia Beach
    Posts
    66
    I am trying to send an email using MAPI and everything works fine until i send it then i get the following error message in my outlook

    No transport provider was available for delivery to this recipient.

    here is the code:

    Dim x As String
    Dim y As String

    x = rtfCopylstReport.Text

    y = InputBox("Please enter an email address.", "EmailAddress")



    MAPISession1.SignOn
    MAPIMessages1.SessionID = Me.MAPISession1.SessionID
    MAPIMessages1.Compose
    MAPIMessages1.MsgSubject = "Search Results"
    MAPIMessages1.MsgNoteText = x
    MAPIMessages1.RecipAddress = y
    MAPIMessages1.RecipDisplayName = MAPIMessages1.RecipAddress
    MAPIMessages1.Send True
    MAPISession1.SignOff

    What am i doing wrong?
    Thanks,
    Cady

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Mar 2000
    Location
    Virginia Beach
    Posts
    66
    never mind, i figured it out!!!!
    thanks anyway.
    Cady

  3. #3
    Hyperactive Member
    Join Date
    Jun 1999
    Location
    Taipei
    Posts
    318

    Talking

    Hi cady,

    I hit the same problem when using email code similar to you. Would you tell me how you solved it ?

    Thanks

    KM Chong

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Mar 2000
    Location
    Virginia Beach
    Posts
    66

    Smile

    Here you go kmchong, on this example i have x=rtfcopylstreport.text because i wanted to automatically put the email contents in, all the user had to do was enter an email address in the input box which was then automatically added to the email, then hit send. I did put some information in the ErrorHandler that allowed for errors but this works great.

    Dim x As String
    Dim y As String


    x = rtfCopylstReport.Text

    y = InputBox("Please enter an email address.", "Email Address")

    On Error GoTo ErrorHandler

    MAPISession1.SignOn
    MAPIMessages1.SessionID = Me.MAPISession1.SessionID
    MAPIMessages1.MsgIndex = -1
    MAPIMessages1.Compose
    MAPIMessages1.RecipAddress = y
    MAPIMessages1.MsgSubject = "search results"
    MAPIMessages1.MsgNoteText = x
    MAPIMessages1.ResolveName
    MAPIMessages1.Send True
    MAPISession1.SignOff



    Let me know if this doesn't make sense, or doesn't help.
    Cady

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