|
-
Apr 1st, 2010, 08:19 AM
#6
Thread Starter
Junior Member
Sending emails in Win7 gives me error 48389 - Solution with new problem
I've got it!
somehow, if I'm sending email with mapi from Outlook to someones email address, his email address loses his E-mail type. If I click into Sent items, search my email, sent from my vb6 application, and make a right click on recipients email address and choose Outlook Properties, I would see his E-mail type like the one in the left picture. And this was wrong!
Here is the example from my solution:
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
I have removed the line with MAPIMessages1.ResolveName and have added "smtp:" to MAPIMessages1.RecipAddress and have done the same with MAPIMessages1.RecipDisplayName. I have also added MAPIMessages1.AddressResolveUI = True
With this code I can send email with attachment without any error!
If I would now check Outlook properties, the email type would be now correct (see the right picture).
So this problem is solved. But now I have another problem (please see the new thread, because this thread is resolved).
Some of recipients emailed back to me, telling 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 this file: Winmail.Dat.
How could this be? Have I missed something??? I suspect Outlook for this weird behavior.
Can someone help me please?
Thank you
Last edited by Spajder; Apr 2nd, 2010 at 01:26 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|