Perl Cloud SDK to work with emails (EML, MHT, MSG) Using Powerful Aspose.Email Cloud APIs

Aspose.Email Cloud

Aspose.Email CloudAspose.Email Cloud is a REST API for manipulating email in the cloud. It is a true REST API that can be used with any language: .NET, Java, Perl, PHP, Ruby, Rails, Python, Node.js and many more. You can use it with any platform — web, desktop, mobile, and cloud. Aspose.Email Cloud allows developers to provide capabilities of processing email messages in their applications. Aspose.Email Cloud is a complete solution that allows you to create email archiving applications that work with common email file formats. It lets developers manipulate message formats such as MSG, EML, and MHT files. The API supports many common tasks, for example accessing messages, reading message properties such as sender, receiver, message sent date, and message details. It also supports converting messages back and forth between EML, MSG and MHT formats. Learn More What’s new in the latest release This is a major release for Aspose.Email Cloud SDK for Perl. It covers all the Aspose.Email Cloud APIs. This SDK provides a complete solution to work with cloud emails in Perl using powerful Aspose.Emails Cloud APIs, so you can manipulate message formats such as MSG, EML, and MHT files in the cloud seamlessly. Source Code Repository Complete source code of this release of Aspose.Email Cloud SDK for Perl is freely available on your favorite GitHub and Codeplex repositories. Setup Aspose.Email Cloud SDK for Perl is also available as released package in the CPAN (Perl Archive Network). You can bypass GitHub source code repository and depend directly on the released package by installing from CPAN: Aspose.Email Cloud SDK for Perl – CPAN installation

sudo cpan AsposeEmailCloud::EmailApi
You can also manually build the module by downloading the code and executing the following in the root directory of the download:

perl Build.PL
./Build test
./Build install
Data In order to manipulate any files, you first need to upload them to the Aspose cloud storage or 3rd party cloud storage using Aspose.Storage Cloud SDK for Perl. Quick SDK Tutorial

use lib 'lib';
use strict;
use warnings;
use AsposeStorageCloud::StorageApi;
use AsposeStorageCloud::ApiClient;
use AsposeStorageCloud::Configuration;

use AsposeEmailCloud::EmailApi;
use AsposeEmailCloud::ApiClient;
use AsposeEmailCloud::Configuration;

$AsposeEmailCloud::Configuration::app_sid = 'XXX';
$AsposeEmailCloud::Configuration::api_key = 'XXX';

$AsposeEmailCloud::Configuration::debug = 1;
$AsposeStorageCloud::Configuration::app_sid = $AsposeEmailCloud::Configuration::app_sid;
$AsposeStorageCloud::Configuration::api_key = $AsposeEmailCloud::Configuration::api_key;

#Instantiate Aspose.Storage API SDK 
my $storageApi = AsposeStorageCloud::StorageApi->new();

#Instantiate Aspose.Email API SDK
my $emailApi = AsposeEmailCloud::EmailApi->new();

my $data_path = '../data/';

#set input file name
my $fileName =  "email_test2";
my $name =  $fileName . ".eml";
my $format = "msg";

#upload file to aspose cloud storage 
my $response = $storageApi->PutCreate(Path => $name, file => $data_path.$name);

#invoke Aspose.Email Cloud SDK API to convert message to other formats                 
$response = $emailApi->GetDocumentWithFormat(name=> $name, format=>$format);

if($response->{'Status'} eq 'OK'){
	#download converted email message from api response 
	my $output_file = 'C:/temp/'. $fileName . '.' . $format;
	write_file($output_file, { binmode => ":raw" }, $response->{'Content'});

Aspose.Email Cloud API Documentation Aspose.Email Cloud Documentation is available to guide developers to get familiar with the specific resources and operations within the Aspose.Email Cloud REST API. Aspose.Email Cloud SDK for Perl Examples Aspose.Email Cloud SDK for Perl Examples are also available to guide developers to get familiar with SDK and its usage to invoke resources and operations using the Aspose.Email Cloud REST API. Please see the SDK examples of following categories. Start a Free Trial Today Start a free trial today – all you need is to sign up with the Aspose Cloud service. Once you have signed up, you are ready to try the powerful file processing features offered by Aspose Cloud.