Results 1 to 8 of 8

Thread: MSG to EML with Qt .....

  1. #1
    Join Date
    Jun 2008
    Location
    Germany/Belarus/Sweden
    Posts
    53
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default MSG to EML with Qt .....

    Hi Everybody!,
    Do somebody know any opensource Library or specs for Outlook e-mail (*.MSG) format?
    I need to convert mails from msg to eml format....

    Thanks for any help!!!

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

  3. #3
    Join Date
    Jun 2008
    Location
    Germany/Belarus/Sweden
    Posts
    53
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: MSG to EML with Qt .....

    Thank you!

  4. #4
    Join Date
    Jun 2008
    Location
    Germany/Belarus/Sweden
    Posts
    53
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: MSG to EML with Qt .....

    It's not opensource and MSG converting feature is only in registered version

    1- The Software is initially provided to you for evaluation purposes. It may be used free of charge on an unlimited number of machines for an unlimited amount of time.

    2- Advanced features of the unregistered Software have been disabled and will only become enabled after registration of the Software has occurred.
    Is where no opensource API for MSG? I can't find any....

  5. #5
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: MSG to EML with Qt .....

    Try searching sourceforge. There are other libraries as well... that was just an example

  6. #6
    Join Date
    Jun 2008
    Location
    Germany/Belarus/Sweden
    Posts
    53
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: MSG to EML with Qt .....

    That looks like what i need:
    http://sourceforge.net/projects/ssfiledll/

    get small problem. Need to convert BSTR string into char * or in unsigned short*.
    Do somebody know how to do that?

  7. #7
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

  8. #8
    Join Date
    Jun 2008
    Location
    Germany/Belarus/Sweden
    Posts
    53
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: MSG to EML with Qt .....

    I get it allready have found my old one function:

    Qt Code:
    1. static inline char * BSTRToString(BSTR pSrc)
    2. {
    3. if(!pSrc) return "";
    4.  
    5. DWORD cb,cwch = ::SysStringLen(pSrc);
    6.  
    7. char *szOut = NULL;
    8.  
    9. if(cb = ::WideCharToMultiByte(CP_ACP, 0,
    10. pSrc, cwch + 1, NULL, 0, 0, 0))
    11. {
    12. szOut = new char[cb];
    13. if(szOut)
    14. {
    15. szOut[cb - 1] = '\0';
    16.  
    17. if(!::WideCharToMultiByte(CP_ACP, 0,
    18. pSrc, cwch + 1, szOut, cb, 0, 0))
    19. {
    20. delete []szOut;
    21. szOut = NULL;
    22. }
    23. }
    24. }
    25. ::SysFreeString(pSrc);
    26. return szOut;
    27. }
    To copy to clipboard, switch view to plain text mode 

    it works for Qt too:
    Qt Code:
    1. static inline QString BSTRToString(BSTR pSrc)
    2. {
    3. if(!pSrc) return "";
    4.  
    5. DWORD cb,cwch = ::SysStringLen(pSrc);
    6.  
    7. char *szOut = NULL;
    8.  
    9. if(cb = ::WideCharToMultiByte(CP_ACP, 0,
    10. pSrc, cwch + 1, NULL, 0, 0, 0))
    11. {
    12. szOut = new char[cb];
    13. if(szOut)
    14. {
    15. szOut[cb - 1] = '\0';
    16.  
    17. if(!::WideCharToMultiByte(CP_ACP, 0,
    18. pSrc, cwch + 1, szOut, cb, 0, 0))
    19. {
    20. delete []szOut;
    21. szOut = NULL;
    22. }
    23. }
    24. }
    25. ::SysFreeString(pSrc);
    26. return QString::fromAscii(szOut);
    27. }
    To copy to clipboard, switch view to plain text mode 

    ssfiledll is nice simple msg parser.

    Thanks marcel for helping me

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.