locked
'CDO.Message' to 'System.Net.Mail.MailMessage'. RRS feed

  • Question

  • Visual studio say "Cannot implicitly convert type 'CDO.Message' to 'System.Net.Mail.MailMessage'. An explicit conversion exists (are you missing a cast?)" but I couldn't find this conversion. May somone help me? Thanks
    Tuesday, September 11, 2012 9:29 PM

Answers

  • Such conversion does not exist. Why you are trying to convert a CDO message to .Net? Can't you do everything in .Net or CDO?


    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP

    • Marked as answer by AntonioIsidro Thursday, September 13, 2012 8:10 PM
    Tuesday, September 11, 2012 10:40 PM

All replies

  • Such conversion does not exist. Why you are trying to convert a CDO message to .Net? Can't you do everything in .Net or CDO?


    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP

    • Marked as answer by AntonioIsidro Thursday, September 13, 2012 8:10 PM
    Tuesday, September 11, 2012 10:40 PM
  • Thank you for answering, Jian.

    I can do what I need in CDO, wich is both writing to disk a new built mail message with a controlled file name, and load such message from the disk for handling/marging. In .Net I need extensions (for loading) for do the same, which I haven't find effective but in paid solutions, which involves a lot more of the funcionalities needed. The case with CDO is how long will it survive in the desktop environment, facing the changes it is having.


    Isidro

    Thursday, September 13, 2012 12:40 PM
  • Programs that use CDO should be re-designed to use other Application Programming Interfaces (APIs) instead of CDO. It is not up to date to the latest MAPI.

    You can hack the .Net class a little bit to specify the file name when the file is generated in the pick up folder.



    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP

    Thursday, September 13, 2012 3:07 PM
  • The save funcionality for .Net is an extension like, for instance: http://www.codeproject.com/Articles/32434/Adding-Save-functionality-to-Microsoft-Net-Mail-Ma

    But the lack of the load funcionality in .Net pushes to the use of CDO. The extension method for it is hard to write, because of the intrincacies the mime format can assume.


    Isidro

    Thursday, September 13, 2012 8:09 PM