Aspose.Email Cloud

Aspose.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, PHP, Ruby, Rails, Python, jQuery 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 revamp release for Aspose.Email Cloud SDK for Python. It covers all the Aspose.Email Cloud APIs. This SDK provides a complete solution to work with cloud emails in Python 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 Python is freely available on your favorite GitHub and Codeplex repositories.

Setup

Aspose.Email Cloud SDK for Python is also available as released package in the PyPI (Python Package Index). You can bypass source code repository and depend directly on the released package by installing from PyPI:

PyPI Aspose.Email Cloud SDK for Python Installation

 pip install asposeemailcloud
OR
easy_install asposeemailcloud 

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 Python.

Quick SDK Tutorial

 import asposeemailcloud
from asposeemailcloud.EmailApi import EmailApi
from asposeemailcloud.EmailApi import ApiException
from asposeemailcloud.models import EmailProperty

import asposestoragecloud 
from asposestoragecloud.StorageApi import StorageApi
from asposestoragecloud.StorageApi import ResponseMessage

apiKey = "XXXXX" #sepcify App Key
appSid = "XXXXX" #sepcify App SID
apiServer = "http://api.aspose.com/v1.1"
data_folder = "../../data/"

#Instantiate Aspose Storage API SDK
storage_apiClient = asposestoragecloud.ApiClient.ApiClient(apiKey, appSid, True)
storageApi = StorageApi(storage_apiClient)
#Instantiate Aspose Email API SDK
api_client = asposeemailcloud.ApiClient.ApiClient(apiKey, appSid, True)
emailApi = EmailApi(api_client);

#set input file name
name =  "email_test.eml";
propertyName = "Subject"

body = EmailProperty.EmailProperty()
body.Name = "Subject"
body.Value = "This is a new subject"

try:
    #upload file to aspose cloud storage
    response = storageApi.PutCreate(name, data_folder + name)

    #invoke Aspose.Email Cloud SDK API to update an email property by name
    response = emailApi.PutSetEmailProperty(name, propertyName, body)

    if(response.Status == 'OK'):
        print "Property Name :: " + response.EmailProperty.Name
        print "Property Value :: " + response.EmailProperty.Value

except ApiException as ex:
            print "ApiException:"
            print "Code:" + str(ex.code)
            print "Message:" + ex.message 

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 Python Examples

Aspose.Email Cloud SDK for Python 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.