2010-03-02 36 views
1
  1. 我想讀取一個Word文件(包含圖像和表格)。
  2. 之後,我想將它的內容轉換爲「RFC 822格式」。

尋找一些APIS和上面的示例代碼。如何使用c#將Word文件內容(包含圖像和表格)轉換爲RFC 822格式?

+2

你的問題沒有意義。 RFC 822定義了電子郵件的結構。 (http://tools.ietf.org/html/rfc822)你的意思是HTML格式? – SLaks 2010-03-02 14:08:23

+0

@SLaks:在這種情況下,他可以發送單詞文件作爲附件。 RFC 822是否包含附件? – FrustratedWithFormsDesigner 2010-03-02 14:16:21

+0

或者也許他想將圖像和表格轉換爲ASCII藝術... – Gabe 2010-03-22 07:07:12

回答

0

RFC 822是不是你要找的規範。

抽象爲RFC 5322揭示了一個道理:

This document specifies the Internet Message Format (IMF), a syntax 
    for text messages that are sent between computer users, within the 
    framework of "electronic mail" messages. This specification is a 
    revision of Request For Comments (RFC) 2822, which itself superseded 
    Request For Comments (RFC) 822, "Standard for the Format of ARPA 
    Internet Text Messages", updating it to reflect current practice and 
    incorporating incremental changes that were specified in other RFCs. 

本款從1.1節( 「範圍」)揭示了另:

This document specifies a syntax only for text messages. In 
    particular, it makes no provision for the transmission of images, 
    audio, or other sorts of structured data in electronic mail messages. 
    There are several extensions published, such as the MIME document 
    series ([RFC2045], [RFC2046], [RFC2049]), which describe mechanisms 
    for the transmission of such data through electronic mail, either by 
    extending the syntax provided here or by structuring such messages to 
    conform to this syntax. Those mechanisms are outside of the scope of 
    this specification. 

我認爲你真正想要的答案一個不同的問題,如:

我該怎麼辦將Word消息轉換爲基於MIME的格式,在各種郵件用戶代理中看起來不錯?

如果我錯了,你真的是詢問如何將Word文檔轉換爲純文本電子郵件,你應該看一看antiword,用於轉換Word文檔爲純文本高度多特徵的工具, PostScript,PDF或docbook。 (沒有跡象表明它可以在輸出純文本時用圖像做任何事情,儘管— 還有,無論如何。)

相關問題