Releases: aspose-email-cloud/aspose-email-cloud-php
21.9.0
Release notes available at https://docs.aspose.cloud/email/aspose-email-cloud-21-9-release-notes/
21.4.0
Release notes available at https://docs.aspose.cloud/email/aspose-email-cloud-21-4-release-notes/
20.12.0
Release notes available at https://docs.aspose.cloud/email/aspose-email-cloud-20-12-release-notes/
20.10.0
Release notes available at https://docs.aspose.cloud/email/aspose-email-cloud-20-10-release-notes/
20.9.0
Release notes available at https://docs.aspose.cloud/email/aspose-email-cloud-20-9-release-notes/
20.7.0
Release notes available at https://docs.aspose.cloud/display/emailcloud/Aspose.Email+Cloud+20.7+Release+Notes
20.5.0
Release notes available at https://docs.aspose.cloud/display/emailcloud/Aspose.Email+Cloud+20.5+Release+Notes
20.3.0
Release notes available at https://docs.aspose.cloud/display/emailcloud/Aspose.Email+Cloud+20.3+Release+Notes
20.2.0
Release notes available at https://docs.aspose.cloud/display/emailcloud/Aspose.Email+Cloud+20.2+Release+Notes
20.1 - Model API
The page contains release notes for Aspose.Email Cloud 20.01 – 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:
$startDate = $startDate == null ? new DateTime() : $startDate;
$endDate = $startDate->add(new DateInterval("PT1H"));
$fileName = uniqid() . ".ics";
$api->createCalendar(new CreateCalendarRequest(
$fileName,
new HierarchicalObjectRequest(
new HierarchicalObject("CALENDAR", null, array(
new PrimitiveObject("LOCATION", null, "location"),
new PrimitiveObject("STARTDATE", null, $startDate->format(DateTime::ATOM)),
new PrimitiveObject("ENDDATE", null, $endDate->format(DateTime::ATOM)),
new HierarchicalObject("ORGANIZER", null, array(
new PrimitiveObject("ADDRESS", null, "[email protected]"),
new PrimitiveObject("DISPLAYNAME", null, "Organizer Man"))),
new HierarchicalObject("ATTENDEES", null, array(
new IndexedHierarchicalObject("ATTENDEE", null, 0, array(
new PrimitiveObject("ADDRESS", null, "[email protected]"),
new PrimitiveObject("DISPLAYNAME", null, "Attendee Man"))))))),
new StorageFolderLocation(self::$storage, self::$folder))));
In the current version, we simplified the work with iCalendar files. Now the same object can be represented by using new CalendarDto model:
$calendar = (new CalendarDto())
->setAttendees(array(new MailAddress("Attendee Name", "[email protected]", "Accepted")))
->setDescription("Some description")
->setSummary("Some summary")
->setOrganizer(new MailAddress("Organizer Name", "[email protected]", "Accepted"))
->setStartDate(new DateTime())
->setEndDate((new DateTime())->add(new DateInterval("PT1H")))
->setLocation("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:
$content = file_get_contents($filePath);
$fileBase64 = base64_encode($content);
$calendar->setAttachments(array(
(new Attachment())
->setBase64Data($fileBase64)
->setName("attachment-name.txt")));
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:
$convertedFile = self::getApi()->convertEmail(
new ConvertEmailRequest("Msg", "file/on/disk"));
$fileContent = $convertedFile->fread($convertedFile->getSize());
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:
$alternate = $api->convertCalendarModelToAlternate(
new ConvertCalendarModelToAlternateRequest(
new CalendarDtoAlternateRq($calendar, "Create")));