Pythonでメールヘッダーを抽出する

Aspose.Email - メールヘッダーの抽出

Aspose.Email Java for Python を使用してメールヘッダーを抽出するには、以下のコードを使用してください。

Python コード

\# Initialize and Load an existing EML file by specifying the MessageFormat
mailMessage = self.MailMessage
message = mailMessage.load(self.dataDir + "Message.eml")
print "Printing all Headers:"
\# Print out all the headers
i=0
while (i < message.getHeaders().getCount()):
    print message.getHeaders().get(i)
    i += 1

実行コードをダウンロード

以下に挙げるソーシャルコーディングサイトのいずれかから メールヘッダーの抽出 (Aspose.Email) をダウンロードしてください: