Hi
I have ICS file for each month, I need to import these files into the Google Calendar. Is it possible with Aspose.Email for .NET library? If so, then refer to an example code.
Hi
I have ICS file for each month, I need to import these files into the Google Calendar. Is it possible with Aspose.Email for .NET library? If so, then refer to an example code.
Unfortunately, Aspose.Email does not provide the requested feature. We have logged it as EMAILNET-40504 in our issue tracking system. We will check the possibility of implementation of this feature and let you know if there is any update available on it.
The ICS file can be added to Google Calendar by Aspose.Email.Clients.Google.GmailClien. Please check the following code snippet.
// Get IGmailclient
using (IGmailClient client = GmailClient.GetInstance("clientId", "client secret", "refreshToken", "email address"))
{
// Create local calendar
Aspose.Email.Clients.Google.Calendar calendar1 = new Aspose.Email.Clients.Google.Calendar("Test summary", null, null, "Europe/Kiev");
string id = client.CreateCalendar(calendar1);
Aspose.Email.Clients.Google.Calendar cal1 = client.FetchCalendar(id);
string calendarId1 = cal1.Id;
try
{
Appointment app1 = Appointment.Load(@"D:\testApp.ics");
client.CreateAppointment(calendarId1, app1);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
Please read the following article.
Working with Gmail Calendars
Note: getting “clientId”,“client secret” and “refreshToken” is not the responsibility of the Aspose.Email
and can be obtained as described in google documentation