Skip to content

Releases: aspose-email-cloud/aspose-email-cloud-java

21.9.0

21 Sep 18:41
Compare
Choose a tag to compare

21.4.0

13 Apr 19:48
Compare
Choose a tag to compare

20.12.0

30 Dec 15:08
Compare
Choose a tag to compare

20.10.0

29 Oct 11:32
Compare
Choose a tag to compare

20.9.0

09 Sep 09:33
Compare
Choose a tag to compare

20.7.0

23 Jul 11:08
Compare
Choose a tag to compare

20.5.0

27 May 14:23
Compare
Choose a tag to compare

20.3.0

16 Mar 09:31
Compare
Choose a tag to compare

20.2.0

26 Feb 12:50
Compare
Choose a tag to compare

20.1 - Model API

28 Jan 11:23
Compare
Choose a tag to compare

The page contains release notes for Aspose.Email Cloud 20.1 – API Reference

New features

Introducing new Model API for VCard, iCalendar and Email message

iCalendar is a MIME type which allows users to exchange and store calendaring and scheduling information such as journal entries, events, free/busy information and to-dos.
In the previous version were only property sets based API. For example, to create iCalendar file using .Net SDK you had to use the following code:

api.createCalendar(new CreateCalendarRequestData(fileName, new HierarchicalObjectRequest(
    new HierarchicalObject("CALENDAR", null, Arrays.<BaseObject>asList(
        new PrimitiveObject("LOCATION", null, "location"),
        new PrimitiveObject("STARTDATE", null, dateFormat.format(startDate.getTime())),
        new PrimitiveObject("ENDDATE", null, dateFormat.format(endDate.getTime())),
        new HierarchicalObject("ORGANIZER", null, Arrays.<BaseObject>asList(
            new PrimitiveObject("ADDRESS", null, "[email protected]"),
            new PrimitiveObject("DISPLAYNAME", null, "Organizer Name")
        )),
        new HierarchicalObject("ATTENDEES", null, Arrays.<BaseObject>asList(
            new IndexedHierarchicalObject(
                "ATTENDEE", null, 0, Arrays.<BaseObject>asList(
                    new PrimitiveObject("ADDRESS", null, "[email protected]"),
                    new PrimitiveObject("DISPLAYNAME", null, "Attendee Name")
                )
            )
        ))
    )),
    new StorageFolderLocation(storage, folder))));

In the current version, we simplified the work with iCalendar files. Now the same object can be represented by using new CalendarDto model:

CalendarDto calendar = new CalendarDto()
    .addAttendeesItem(new MailAddress("Attendee Name", "[email protected]", "Accepted"))
    .description("Some description")
    .summary("Some summary")
    .organizer(new MailAddress("Organizer Name", "[email protected]", "Accepted"))
    .startDate(startDate.getTime())
    .endDate(endDate.getTime())
    .location("Some location");

You can use both ways to work with iCalendar files.

Model API does not have separate methods to operate with attachments. Attachments can be operated directly by transforming files to Base64 strings:

byte[] fileBytes = IOUtils.toByteArray(
    new FileInputStream("some/file/on/disk"));
Attachment attachment = new Attachment();
attachment.base64Data(Base64.encodeToString(fileBytes, false));
attachment.name("attachment-name.txt");
calendar.addAttachmentsItem(attachment);

More examples available on SDK wiki pages: .Net, Java, Python, Ruby, Typescript, PHP

Files conversion

Aspose.Email Cloud supports MSG, MHTM, HTML and EML file formats to store emails. Now new methods to convert such files are available. For example, to convert EML to MSG, you can use the following code:

byte[] fileToConvert = IOUtils.toByteArray(
    new FileInputStream("file/on/disk"));
File convertedFile = api.convertEmail(new ConvertEmailRequestData(
        "Msg", fileToConvert));

More details on SDK wiki pages: .Net, Java, Python, Ruby, Typescript, PHP
Also, we added iCalendar to AlternateView converter. Now it can be properly attached to an email message:

AlternateView alternate = api.convertCalendarModelToAlternate(
    new ConvertCalendarModelToAlternateRequestData(
        new CalendarDtoAlternateRq(calendar, "Create", null)));

SDK changes