Results 1 to 8 of 8

Thread: [RESOLVED] Sending emails in Win7 gives me error 48389

Hybrid View

  1. #1
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: Sending messages in Win7 gives me error 48389

    Quote Originally Posted by Spajder View Post
    No, it didn't help me much, because my project works on the same way as yours. In line MAPIMessages1.ResolveName i still get the error 48389.

    Maybe I should rephrase myself:
    How to program my vb6 project, so it would work with any deafult email client everywhere (no matter what Windows and email clients users have)?

    Can someone help me please?
    If you don't want to use the programs like Outlook,etc... then, you can try using the vbsendmail or CDO for sending mails....

    Links:
    Using CDO for sending mails:
    * http://www.vbforums.com/showthread.p...=sending+email
    * http://www.vbforums.com/showthread.p....message+gmail

    Using vbsendmail:

    * http://www.vbforums.com/showthread.p...ght=vbsendmail

    For more, search the forum....

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  2. #2

    Thread Starter
    Junior Member
    Join Date
    Jan 2009
    Posts
    17

    Re: Sending messages in Win7 gives me error 48389

    Is there a chance, that I could keep my MAPI for sending emails with attachments in Windows 7?

    This MAPIMessages1.ResolveName problem really bugs me

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jan 2009
    Posts
    17

    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
    Attached Images Attached Images   
    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
  •  



Click Here to Expand Forum to Full Width