रूबी में ईमेल संदेशों का रूपांतरण

Aspose.Email - ईमेल संदेश परिवर्तित करना

Aspose.Email Java for Ruby का उपयोग करके ईमेल संदेशों को बदलने के लिए, Converter मॉड्यूल की convert_eml_to_msg मेथड को कॉल करें। यहाँ आप उदाहरण कोड देख सकते हैं।

Ruby कोड


 def convert_eml_to_msg()    

    data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'

    # Initialize and Load an existing EML file by specifying the MessageFormat

    eml = Rjb::import('com.aspose.email.MailMessage').load(data_dir + "Message.eml")

    # Save the Email message to disk in Unicode format

    eml.save(data_dir + "AnEmail.msg", Rjb::import('com.aspose.email.SaveOptions').getDefaultMsgUnicode())

    # Display Status

    puts "Converted eml to msg successfully."

end

चल रहा कोड डाउनलोड करें

नीचे उल्लेखित किसी भी सामाजिक कोडिंग साइट से ईमेल संदेश परिवर्तित करना (Aspose.Email) डाउनलोड करें: