E-mailinformatie weergeven op het scherm in Python

Aspose.Email - E‑mailinformatie weergeven

Om e‑mailinformatie weer te geven met Aspose.Email Java for Python, gebruik de volgende 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()

Werkende code downloaden

Download E‑mailinformatie weergeven (Aspose.Email) van een van de hieronder genoemde sociale code‑sites: