Results 1 to 2 of 2

Thread: Problem with MAPI sending attachment through Outlook

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2009
    Posts
    17

    Angry Problem with MAPI sending attachment through Outlook

    Hi,

    for sending emails with attachment in Windows 7 through Outlook 2007 with MAPI control, I'm using this code:

    Code:
    If MAPISession1.SessionID <> 0 Then
       MAPISession1.SignOff
    End If
    MAPISession1.SignOn
    MAPIMessages1.SessionID = MAPISession1.SessionID
    MAPIMessages1.Compose
    
    MAPIMessages1.RecipAddress = "smtp: [email protected]"
    MAPIMessages1.RecipDisplayName = "smtp: [email protected]"
    MAPIMessages1.AddressResolveUI = True
    
    MAPIMessages1.MsgSubject = "My email with attachment"
    MAPIMessages1.AttachmentPathName = Path & "\" & name
    MAPIMessages1.MsgNoteText = "Hi there. " & Chr(10) _
         & "Here are some pgp files for you!"
    MAPIMessages1.send False 
    If MAPISession1.SessionID <> 0 Then
       MAPISession1.SignOff
    Else
       MsgBox "This email could not be send to recipient!"
    End If
    In this resolved thread http://www.vbforums.com/showthread.php?t=605286 you can read, what was the problem with sending email in Windows 7.
    With the code above I can send email with attachment without any error. But some recipients are reporting back to me, that email attachments (like file.pgp) are in wrong format or the files are not attached at all. Some of them have had attached only this file: Winmail.Dat.
    I suspect Outlook for this weird behavior. Is something missing in my code or what in my code makes attachment in email corrupt?

    Thanks in advance for any help

  2. #2

    Thread Starter
    Junior Member
    Join Date
    Jan 2009
    Posts
    17

    Important notice to the problem

    I just got the news, that recipients, who have problems with email attachment, are using either Outlook Express or Lotusnotes email client.

    But I'm still puzzled, how to solve this...

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