2014-02-20 41 views
0

如何使用填充的Unicode內容和附件在默認電子郵件客戶端中打開新電子郵件窗口?如何使用填充的unicode內容和附件在默認電子郵件客戶端中打開新電子郵件窗口?

  • 如果我使用mailto,它不支持附件。
  • 如果我使用System.Net.Mail,它不會打開一個新的電子郵件窗口
  • 如果我使用MAPI,它不支持unicode。而且我似乎無法在C#中使用MAPISendMailHelper或MAPISendMailW。

我錯過了什麼嗎?

回答

0

MAPI不支持Unicode,但是您可以在互操作代碼中得到它嗎?

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] 
public class MapiMessage 
{ 
    public int reserved; public string subject; public string noteText; 
    public string messageType; public string dateReceived; public string conversationID; 
    public int flags; public IntPtr originator; public int recipCount; public IntPtr recips; 
    public int fileCount; public IntPtr files; 
} 

[DllImport("MAPI32.DLL", CharSet = CharSet.Ansi)] 

我一直在使用以下爲出發點:https://stackoverflow.com/a/4195551/1720293

我覺得你還是可以在你的C#代碼中使用MAPI32.DLL。

+0

我已經在使用類似的東西,unicode字符會變成問號,這就是爲什麼我問。 – user1249190

相關問題