Displaying Email Information on Screen in Python

Aspose.Email - Displaying Email Information

To Displaying Email Information using Aspose.Email Java for Python, Use following code.

Python Code




\# Create MailMessage instance by loading an Eml file

message_format = self.MessageFormat

mailMessage = self.MailMessage

message = mailMessage.load(self.dataDir + "Message.eml")

print "From: " 

print message.getFrom()

print "To: " 

print message.getTo()

print "Subject: " 

print message.getSubject()

print "HtmlBody: " 

print message.getHtmlBody()

print "TextBody: " 

print message.getTextBody()

Download Running Code

Download Displaying Email Information (Aspose.Email) from any of the below mentioned social coding sites: