Jython में ईमेल संदेशों का रूपांतरण
Contents
[
Hide
]
Aspose.Email - ईमेल संदेश परिवर्तित करना
Aspose.Email Java for Jython का उपयोग करके ईमेल संदेशों को बदलने के लिए, Converter मॉड्यूल की convert_eml_to_msg मेथड को कॉल करें। यहाँ आप उदाहरण कोड देख सकते हैं।
Jython कोड
from aspose-email import Settings
from com.aspose.email import MailMessage
from com.aspose.email import SaveOptions
class Converter:
def __init__(self):
# Loading EML, Saving to MSG
self.convert_eml_to_msg()
def convert_eml_to_msg(dataDir):
dataDir = Settings.dataDir + 'ProgrammingEmail/Converter/'
# Initialize and Load an existing EML file by specifying the MessageFormat
mailMessage = MailMessage()
eml = mailMessage.load(dataDir + "Message.eml")
# Save the Email message to disk in Unicode format
saveOptions= SaveOptions
eml.save(dataDir + "AnEmail.msg", saveOptions.getDefaultMsgUnicode())
# Display Status
print "Converted email to msg successfully."
if __name__ == '__main__':
Converter()
चल रहा कोड डाउनलोड करें
नीचे उल्लेखित किसी भी सामाजिक कोडिंग साइट से ईमेल संदेश परिवर्तित करना (Aspose.Email) डाउनलोड करें: