<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Blog &#124; Limilabs &#187; iCalendar</title>
	<atom:link href="http://www.limilabs.com/blog/tag/icalendar/feed" rel="self" type="application/rss+xml" />
	<link>http://www.limilabs.com/blog</link>
	<description></description>
	<lastBuildDate>Mon, 21 May 2012 09:49:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Receive iCalendar meeting request</title>
		<link>http://www.limilabs.com/blog/receive-icalendar-meeting-request?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=receive-icalendar-meeting-request</link>
		<comments>http://www.limilabs.com/blog/receive-icalendar-meeting-request#comments</comments>
		<pubDate>Mon, 30 Jan 2012 09:16:46 +0000</pubDate>
		<dc:creator>Limilabs support</dc:creator>
				<category><![CDATA[Component]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[iCalendar]]></category>
		<category><![CDATA[IMAP]]></category>
		<category><![CDATA[Mail.dll]]></category>
		<category><![CDATA[POP3]]></category>
		<category><![CDATA[VB.NET]]></category>

		<guid isPermaLink="false">http://www.limilabs.com/blog/?p=2533</guid>
		<description><![CDATA[Mail.dll .NET email component makes receiving iCalendar meeting request fairly easy. IMail object exposes Appointments collection that contains all appointments that were found while parsing an email. You can use both IMAP or POP3 protocol to download email from the server. Here&#8217;s the simple sample showing how to process iCalendar appointments: // C# IMail email [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.limilabs.com/mail">Mail.dll .NET email component</a> makes receiving iCalendar meeting request fairly easy.</p>
<p><em>IMail</em> object exposes <em>Appointments</em> collection that contains all appointments that were found while parsing an email.</p>
<p>You can use both IMAP or POP3 protocol to <a href="http://www.limilabs.com/blog/receive-unseen-emails-using-imap">download email from the server</a>.</p>
<p>Here&#8217;s the simple sample showing how to process iCalendar appointments:</p>
<pre class="brush: csharp;">
// C#

IMail email = new MailBuilder().CreateFromEml(client.GetMessageByUID(uid));

foreach (Appointment appointment in email.Appointments)
{
    if (appointment.Method == Method.Request)
    {
        // appointment was created
        string summary = appointment.Event.Summary;
        DateTime? start = appointment.Event.Start;
        DateTime? end = appointment.Event.End;
        string location = appointment.Event.Location;

        Console.WriteLine(&quot;{0} at {1} ({2}-{3})&quot;, summary, location, start, end);

        foreach (Participant participant in appointment.Event.Participants)
        {
            Console.WriteLine(&quot;Common name: &quot; + participant.Cn);
            Console.WriteLine(&quot;Email: &quot; + participant.Email);
            Console.WriteLine(&quot;Participation status: &quot; + participant.Status);
        }
    }
    else if (appointment.Method == Method.Cancel)
    {
        // appointment was canceled
        Console.WriteLine(&quot;Event was cancelled: &quot; + appointment.Event.UID);

    }
    else if (appointment.Method == Method.Reply)
    {
        // someone replied to the request
        foreach (Participant participant in appointment.Event.Participants)
        {
            if (participant.Status == ParticipationStatus.Accepted)
                Console.WriteLine(&quot;Event was accepted by: &quot; + participant.Email);
            else if (participant.Status == ParticipationStatus.Declined)
                Console.WriteLine(&quot;Event was declined by: &quot; + participant.Email);
        }

    }
}
</pre>
<pre class="brush: vb;">
' VB.NET

Dim email As IMail = New MailBuilder().CreateFromEml(client.GetMessageByUID(uid))

For Each appointment As Appointment In email.Appointments
	If appointment.Method = Method.Request Then
		' appointment was created
		Dim summary As String = appointment.[Event].Summary
		Dim start As System.Nullable(Of DateTime) = appointment.[Event].Start
		Dim [end] As System.Nullable(Of DateTime) = appointment.[Event].[End]
		Dim location As String = appointment.[Event].Location

		Console.WriteLine(&quot;{0} at {1} ({2}-{3})&quot;, summary, location, start, [end])

		For Each participant As Participant In appointment.[Event].Participants
			Console.WriteLine(&quot;Common name: &quot; + participant.Cn)
			Console.WriteLine(&quot;Email: &quot; + participant.Email)
			Console.WriteLine(&quot;Participation status: &quot; + participant.Status)
		Next
	ElseIf appointment.Method = Method.Cancel Then
		' appointment was canceled

		Console.WriteLine(&quot;Event was cancelled: &quot; + appointment.[Event].UID)
	ElseIf appointment.Method = Method.Reply Then
		' someone replied to the request
		For Each participant As Participant In appointment.[Event].Participants
			If participant.Status = ParticipationStatus.Accepted Then
				Console.WriteLine(&quot;Event was accepted by: &quot; + participant.Email)
			ElseIf participant.Status = ParticipationStatus.Declined Then
				Console.WriteLine(&quot;Event was declined by: &quot; + participant.Email)
			End If

		Next
	End If
Next
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.limilabs.com/blog/receive-icalendar-meeting-request/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Send iCalendar meeting requests for different timezone</title>
		<link>http://www.limilabs.com/blog/send-icalendar-meeting-requests-for-different-timezone?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=send-icalendar-meeting-requests-for-different-timezone</link>
		<comments>http://www.limilabs.com/blog/send-icalendar-meeting-requests-for-different-timezone#comments</comments>
		<pubDate>Sun, 01 Jan 2012 14:18:57 +0000</pubDate>
		<dc:creator>Limilabs support</dc:creator>
				<category><![CDATA[Component]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[iCalendar]]></category>
		<category><![CDATA[Mail.dll]]></category>
		<category><![CDATA[SMTP]]></category>
		<category><![CDATA[VB.NET]]></category>

		<guid isPermaLink="false">http://www.limilabs.com/blog/?p=1842</guid>
		<description><![CDATA[Usually you define time of an event in relation to UTC time zone. If you need to define event on 9:00 o&#8217;clock in Alaska you simply need to subtract 9 hours from event time to get the event time in UTC (18:00:00). 18 &#8211; 9 = 9. It all works great in December (Alaska is [...]]]></description>
			<content:encoded><![CDATA[<p>Usually you define time of an event in relation to UTC time zone.</p>
<p>If you need to define event on 9:00 o&#8217;clock in Alaska you simply need to subtract 9 hours from event time to get the event time in UTC<br />
(18:00:00). 18 &#8211; 9 = 9.</p>
<p>It all works great in December (Alaska is UTC-9), but in May, <strong>daylight saving time is in effect</strong> in Alaska (Alaska is UTC-8 then).</p>
<p>If the event is recurring, in May, event is going to be held on 10:00 Alaska time (18 &#8211; 8 = 10). Which is most likely not what you want.</p>
<p>As the time zones in different parts of world change way to often to reflect these changes in Mail.dll, you&#8217;ll need to specify the time zone when creating new event (including the daylight savings time).</p>
<p>Here&#8217;s the sample:</p>
<pre class="brush: csharp;">
// C#
using Fluent = Limilabs.Mail.Fluent;
using Limilabs.Client.SMTP;
using Limilabs.Mail;
using Limilabs.Mail.Appointments;

Appointment appointment = new Appointment();

// Create time zone
VTimeZone alaska = appointment.AddTimeZone();
alaska.TimeZoneId = &quot;America/Anchorage&quot;;

// Define standard time offset
var standardRecurring = new RecurringRule();
standardRecurring.Frequency = Frequency.Yearly;
standardRecurring.ByDay.Add(Weekday.Sunday);
standardRecurring.ByMonths.Add(11);

var standard = new StandardOffset
{
    Name = &quot;AKST&quot;,
    Start = new DateTime(1970, 11, 01, 02, 00, 00),
    OffsetFrom = TimeSpan.FromHours(-8),
    OffsetTo = TimeSpan.FromHours(-9),
    RecurringRule = standardRecurring
};

// Define daylight time offset
var daylightRecurring = new RecurringRule();
daylightRecurring.Frequency = Frequency.Yearly;
daylightRecurring.ByDay.Add(new Weekday(2, Weekday.Sunday));
daylightRecurring.ByMonths.Add(3);

var daylight = new DaylightOffset
{
    Name = &quot;AKDT&quot;,
    Start = new DateTime(1970, 03, 08, 02, 00, 00),
    OffsetFrom = TimeSpan.FromHours(-9),
    OffsetTo = TimeSpan.FromHours(-8),
    RecurringRule = daylightRecurring
};

alaska.Standard.Add(standard);
alaska.Daylight.Add(daylight);

// Define event
Event e = appointment.AddEvent();
e.Start = new DateTime(2007, 08, 17, 12, 00, 00);
e.End = new DateTime(2007, 08, 17, 12, 30, 00);
e.Summary = &quot;At noon in Alaska&quot;;
e.InTimeZone(alaska);

e.SetOrganizer(new Person(&quot;Alice&quot;, &quot;alice@example.org&quot;));

e.AddParticipant(new Participant(
    &quot;Bob&quot;, &quot;bob@example.org&quot;, ParticipationRole.Required, true));
e.AddParticipant(new Participant(
    &quot;Tom&quot;, &quot;tom@example.org&quot;, ParticipationRole.Optional, true));
e.AddParticipant(new Participant(
    &quot;Alice&quot;, &quot;alice@example.org&quot;, ParticipationRole.Required, true));

Alarm alarm = e.AddAlarm();
alarm.BeforeStart(TimeSpan.FromMinutes(15));

IMail email = Fluent.Mail
    .Text(&quot;Status meeting at noon in Alaska.&quot;)
    .Subject(&quot;Status meeting&quot;)
    .From(&quot;alice@example.org&quot;)
    .To(&quot;bob@example.org&quot;)
    .To(&quot;tom@example.org&quot;)
    .AddAppointment(appointment)
    .Create();

using (Smtp smtp = new Smtp())
{
    smtp.Connect(&quot;smtp.example.org&quot;); // or ConnectSSL
    smtp.UseBestLogin(&quot;user&quot;, &quot;password&quot;);
    smtp.SendMessage(email);
    smtp.Close();
}
</pre>
<pre class="brush: vb;">
' VB.NET
Imports Fluent = Limilabs.Mail.Fluent
Imports Limilabs.Client.SMTP
Imports Limilabs.Mail
Imports Limilabs.Mail.Appointments

Dim appointment As New Appointment()

' Create time zone
Dim alaska As VTimeZone = appointment.AddTimeZone()
alaska.TimeZoneId = &quot;America/Anchorage&quot;

' Define standard time offset
Dim standardRecurring = New RecurringRule()
standardRecurring.Frequency = Frequency.Yearly
standardRecurring.ByDay.Add(Weekday.Sunday)
standardRecurring.ByMonths.Add(11)

Dim standard = New StandardOffset() With { _
	.Name = &quot;AKST&quot;, _
	.Start = New DateTime(1970, 11, 1, 2, 0, 0), _
	.OffsetFrom = TimeSpan.FromHours(-8), _
	.OffsetTo = TimeSpan.FromHours(-9), _
	.RecurringRule = standardRecurring _
}

' Define daylight time offset
Dim daylightRecurring = New RecurringRule()
daylightRecurring.Frequency = Frequency.Yearly
daylightRecurring.ByDay.Add(New Weekday(2, Weekday.Sunday))
daylightRecurring.ByMonths.Add(3)

Dim daylight = New DaylightOffset() With { _
	.Name = &quot;AKDT&quot;, _
	.Start = New DateTime(1970, 3, 8, 2, 0, 0), _
	.OffsetFrom = TimeSpan.FromHours(-9), _
	.OffsetTo = TimeSpan.FromHours(-8), _
	.RecurringRule = daylightRecurring _
}

alaska.Standard.Add(standard)
alaska.Daylight.Add(daylight)

' Define event
Dim e As [Event] = appointment.AddEvent()
e.Start = New DateTime(2007, 8, 17, 12, 0, 0)
e.[End] = New DateTime(2007, 8, 17, 12, 30, 0)
e.Summary = &quot;At noon in Alaska&quot;
e.InTimeZone(alaska)

e.SetOrganizer(New Person(&quot;Alice&quot;, &quot;alice@example.org&quot;))

e.AddParticipant(New Participant( _
	&quot;Bob&quot;, &quot;bob@example.org&quot;, ParticipationRole.Required, True))
e.AddParticipant(New Participant( _
	&quot;Tom&quot;, &quot;tom@example.org&quot;, ParticipationRole.[Optional], True))
e.AddParticipant(New Participant( _
	&quot;Alice&quot;, &quot;alice@example.org&quot;, ParticipationRole.Required, True))

Dim alarm As Alarm = e.AddAlarm()
alarm.BeforeStart(TimeSpan.FromMinutes(15))

Dim email As IMail = Fluent.Mail _
	.Text(&quot;Status meeting at noon in Alaska.&quot;) _
	.Subject(&quot;Status meeting&quot;) _
	.From(&quot;alice@example.org&quot;) _
	.[To](&quot;bob@example.org&quot;) _
	.[To](&quot;tom@example.org&quot;) _
	.AddAppointment(appointment) _
	.Create()

Using smtp As New Smtp()
	smtp.Connect(&quot;smtp.example.org&quot;) 	' or ConnectSSL
	smtp.UseBestLogin(&quot;user&quot;, &quot;password&quot;)
	smtp.SendMessage(email)
	smtp.Close()
End Using
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.limilabs.com/blog/send-icalendar-meeting-requests-for-different-timezone/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Send iCalendar recurring meeting requests</title>
		<link>http://www.limilabs.com/blog/send-icalendar-recurring-meeting-requests?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=send-icalendar-recurring-meeting-requests</link>
		<comments>http://www.limilabs.com/blog/send-icalendar-recurring-meeting-requests#comments</comments>
		<pubDate>Fri, 19 Nov 2010 16:57:16 +0000</pubDate>
		<dc:creator>Limilabs support</dc:creator>
				<category><![CDATA[Component]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[iCalendar]]></category>
		<category><![CDATA[Mail.dll]]></category>
		<category><![CDATA[SMTP]]></category>
		<category><![CDATA[VB.NET]]></category>

		<guid isPermaLink="false">http://www.limilabs.com/blog/?p=1614</guid>
		<description><![CDATA[First add all necessary namespaces: // C# version using System; using Limilabs.Mail; using Limilabs.Mail.Appointments; using Limilabs.Mail.Headers; using Fluent = Limilabs.Mail.Fluent; using Limilabs.Client.SMTP; ' VB.NET version Imports System; Imports Limilabs.Mail; Imports Limilabs.Mail.Appointments; Imports Limilabs.Mail.Headers; Imports Fluent = Limilabs.Mail.Fluent; Imports Limilabs.Client.SMTP; Now, we&#8217;ll create an appointment, specify it&#8217;s recurring options and send it: // C# version Appointment [...]]]></description>
			<content:encoded><![CDATA[<p>First add all necessary namespaces:</p>
<pre class="brush: csharp;">
// C# version

using System;
using Limilabs.Mail;
using Limilabs.Mail.Appointments;
using Limilabs.Mail.Headers;
using Fluent = Limilabs.Mail.Fluent;
using Limilabs.Client.SMTP;
</pre>
<pre class="brush: vb;">
' VB.NET version

Imports System;
Imports Limilabs.Mail;
Imports Limilabs.Mail.Appointments;
Imports Limilabs.Mail.Headers;
Imports Fluent = Limilabs.Mail.Fluent;
Imports Limilabs.Client.SMTP;
</pre>
<p>Now, we&#8217;ll create an appointment, specify it&#8217;s recurring options and send it:</p>
<pre class="brush: csharp;">
// C# version

Appointment appointment = new Appointment();
Event newEvent = appointment.AddEvent();
newEvent.SetOrganizer(new Person(&quot;Alice&quot;, &quot;alice@example.org&quot;));
newEvent.AddParticipant(new Participant(&quot;Bob&quot;, &quot;bob@gmail.com&quot;));
newEvent.Description = &quot;We need to talk about the daily report&quot;;
newEvent.Summary = &quot;Daily report meeting&quot;;
newEvent.Start = new DateTime(2010, 11, 29, 16, 0, 0);
newEvent.End = new DateTime(2010, 11, 29, 17, 0, 0);
newEvent.Priority = 5;
newEvent.Class = EventClass.Public;

RecurringRule rule = newEvent.AddRecurringRule();
rule.Interval = 1;
rule.Until = new DateTime(2011, 12, 1); // -or- rule.Count = 10;

// Every week on  Mon, Tue, Wed, Thu Fri:
rule.Frequency = Frequency.Weekly;
rule.ByDay.AddRange(new[] {
    Weekday.Monday,
    Weekday.Tuesday,
    Weekday.Wednesday,
    Weekday.Thursday,
    Weekday.Friday });

Alarm alarm = newEvent.AddAlarm();
alarm.Description = &quot;Reminder&quot;;
alarm.BeforeStart(TimeSpan.FromMinutes(5));

IMail email = Fluent.Mail.Text(&quot;Daily report meeting at 4PM&quot;)
    .Subject(&quot;Daily report meeting&quot;)
    .From(new MailBox(&quot;alice@example.org&quot;, &quot;Alice&quot;))
    .To(new MailBox(&quot;bob@example.org&quot;, &quot;Bob&quot;))
    .AddAppointment(appointment)
    .Create();

using (Smtp client = new Smtp())
{
    client.ConnectSSL(&quot;smtp.example.org&quot;);
    client.UseBestLogin(&quot;user&quot;, &quot;password&quot;);
    client.SendMessage(email);
    client.Close();
}
</pre>
<pre class="brush: vb;">
' VB.NET version

Dim appointment As New Appointment()
Dim newEvent As [Event] = appointment.AddEvent()
newEvent.SetOrganizer(New Person(&quot;Alice&quot;, &quot;alice@example.org&quot;))
newEvent.AddParticipant(New Participant(&quot;Bob&quot;, &quot;bob@gmail.com&quot;))
newEvent.Description = &quot;We need to talk about the daily report&quot;
newEvent.Summary = &quot;Daily report meeting&quot;
newEvent.Start = New DateTime(2010, 11, 29, 16, 0, 0)
newEvent.[End] = New DateTime(2010, 11, 29, 17, 0, 0)
newEvent.Priority = 5
newEvent.[Class] = EventClass.[Public]

Dim rule As RecurringRule = newEvent.AddRecurringRule()
rule.Interval = 1
rule.Until = New DateTime(2011, 12, 1)
' -or- rule.Count = 10;
' Every week on  Mon, Tue, Wed, Thu Fri:
rule.Frequency = Frequency.Weekly
rule.ByDay.AddRange(New Weekday() {Weekday.Monday _
                                   , Weekday.Tuesday _
                                   , Weekday.Wednesday _
                                   , Weekday.Thursday _
                                   , Weekday.Friday})

Dim alarm As Alarm = newEvent.AddAlarm()
alarm.Description = &quot;Reminder&quot;
alarm.BeforeStart(TimeSpan.FromMinutes(5))

Dim email As IMail = Fluent.Mail.Text(&quot;Daily report meeting at 4PM&quot;) _
    .Subject(&quot;Daily report meeting&quot;) _
    .From(New MailBox(&quot;alice@example.org&quot;, &quot;Alice&quot;)) _
    .[To](New MailBox(&quot;bob@example.org&quot;, &quot;Bob&quot;)) _
    .AddAppointment(appointment).Create()

Using client As New Smtp()
    client.ConnectSSL(&quot;smtp.example.org&quot;)
    client.UseBestLogin(&quot;user&quot;, &quot;password&quot;)
    client.SendMessage(email)
    client.Close()
End Using
</pre>
<p>This is how it looks like in Gmail:</p>
<p><img src="http://www.limilabs.com/blog/wp-content/uploads/2010/11/RecurringAppointment1.jpg" alt="Recurring appointment" title="Recurring appointment" width="600" height="370" class="aligncenter size-full wp-image-1619" /></p>
<p><img src="http://www.limilabs.com/blog/wp-content/uploads/2010/11/RecurringAppointment1.jpg" alt="Recurring appointment" title="Recurring appointment" width="600" height="370" class="aligncenter size-full wp-image-1619" /></p>
<p>Here are the few samples of how you can set the frequency:</p>
<p>Daily:</p>
<pre class="brush: csharp;">
// C# version

rule.Frequency = Frequency.Daily;
</pre>
<pre class="brush: vb;">
' VB.NET version

rule.Frequency = Frequency.Daily
</pre>
<p>Every month on last monday:</p>
<pre class="brush: csharp;">
// C# version

rule.Frequency = Frequency.Monthly;
rule.ByDay.Add(Weekday.LastMonday);
</pre>
<pre class="brush: vb;">
' VB.NET version

rule.Frequency = Frequency.Monthly
rule.ByDay.Add(Weekday.LastMonday)
</pre>
<p>Every month on second but last monday:</p>
<pre class="brush: csharp;">
// C# version

rule.Frequency = Frequency.Monthly;
rule.ByDay.Add(new Weekday(-2, Weekday.Monday));
</pre>
<pre class="brush: vb;">
' VB.NET version

rule.Frequency = Frequency.Monthly
rule.ByDay.Add(New Weekday(-2, Weekday.Monday))
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.limilabs.com/blog/send-icalendar-recurring-meeting-requests/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Send iCalendar meeting requests</title>
		<link>http://www.limilabs.com/blog/send-icalendar-meeting-requests?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=send-icalendar-meeting-requests</link>
		<comments>http://www.limilabs.com/blog/send-icalendar-meeting-requests#comments</comments>
		<pubDate>Mon, 10 May 2010 18:00:42 +0000</pubDate>
		<dc:creator>Limilabs support</dc:creator>
				<category><![CDATA[Component]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[iCalendar]]></category>
		<category><![CDATA[Mail.dll]]></category>
		<category><![CDATA[SMTP]]></category>
		<category><![CDATA[VB.NET]]></category>

		<guid isPermaLink="false">http://www.limilabs.com/blog/?p=886</guid>
		<description><![CDATA[Mail.dll .NET email component includes support for popular iCalendar standard. iCalendar is used by most popular email clients like Outlook or Gmail. It allows Internet users to send meeting requests and tasks to other users, via email, or sharing files with an extension of .ics. Recipients of the iCalendar data file (with supporting software, such [...]]]></description>
			<content:encoded><![CDATA[<p>  <img src="http://www.limilabs.com/blog/wp-content/uploads/2010/05/iCalendar.jpg" alt="" title="iCalendar" width="128" height="128" class="alignleft size-full wp-image-891" /></p>
<p><a href="http://www.limilabs.com/mail">Mail.dll .NET email component</a> includes support for popular iCalendar standard.</p>
<p><strong>iCalendar</strong> is used by most popular email clients like Outlook or Gmail. It allows Internet users to send meeting requests and tasks to other users, via email, or sharing files with an extension of .ics.</p>
<p>Recipients of the iCalendar data file (with supporting software, such as an email client or calendar application) can respond to the sender easily or counter propose another meeting date/time.</p>
<p>First make sure that your &#8216;usings&#8217; or &#8216;Imports&#8217; section includes all needed namespaces:</p>
<pre class="brush: csharp;">
// C#

using Limilabs.Mail;
using Limilabs.Mail.Fluent;
using Limilabs.Mail.Appointments;
</pre>
<pre class="brush: vb;">
' VB.NET

Imports Limilabs.Mail
Imports Limilabs.Mail.Fluent
Imports Limilabs.Mail.Appointments
</pre>
<p>And now the code.</p>
<p>First we&#8217;ll create an appointment object add new event to it:</p>
<pre class="brush: csharp;">
Appointment appointment = new Appointment();
Event e = appointment.AddEvent();
</pre>
<p>Then we need to set <strong>start </strong>and <strong>end dates</strong>:</p>
<pre class="brush: csharp;">
e.Description = &quot;Status meeting description&quot;;
e.Summary = &quot;Status meeting summary&quot;;
e.Start = new DateTime(2010, 05, 10, 16, 00, 00);
e.End = new DateTime(2010, 05, 10, 17, 00, 00);
</pre>
<p>Now we&#8217;ll add all required and optional <strong>participants </strong> to it:</p>
<pre class="brush: csharp;">
e.SetOrganizer(new Person(&quot;Alice&quot;, &quot;alice@mail.com&quot;));

e.AddParticipant(new Participant(
	&quot;Bob&quot;, &quot;bob@mail.com&quot;, ParticipationRole.Required, true));
e.AddParticipant(new Participant(
	&quot;Tom&quot;, &quot;tom@mail.com&quot;, ParticipationRole.Optional, true));
e.AddParticipant(new Participant(
	&quot;Alice&quot;, &quot;alice@mail.com&quot;, ParticipationRole.Required, true));
</pre>
<p>We&#8217;ll add an <strong>alarm </strong>to the event (set 15 minutes before the event start):</p>
<pre class="brush: csharp;">
Alarm alarm = e.AddAlarm();
alarm.BeforeStart(TimeSpan.FromMinutes(15));
</pre>
<p>Finally we&#8217;ll create an email <strong>add the appointment</strong> to it and send it:</p>
<pre class="brush: csharp;">
Mail.Text(&quot;Status meeting at 4PM.&quot;)
	.Subject(&quot;Status meeting&quot;)
	.From(&quot;alice@mail.com&quot;)
    .To(&quot;bob@mail.com&quot;)
    .AddAppointment(appointment)
    .UsingNewSmtp()
    .WithCredentials(&quot;alice@mail.com&quot;, &quot;password&quot;)
	.Server(&quot;smtp.mail.com&quot;)
	.WithSSL()
	.Send();
</pre>
<p>The <strong>entire C# code</strong> looks as follows:</p>
<pre class="brush: csharp;">
Appointment appointment = new Appointment();

Event e = appointment.AddEvent();
e.Description = &quot;Status meeting description&quot;;
e.Summary = &quot;Status meeting summary&quot;;
e.Start = new DateTime(2010, 05, 10, 16, 00, 00);
e.End = new DateTime(2010, 05, 10, 17, 00, 00);

e.SetOrganizer(new Person(&quot;Alice&quot;, &quot;alice@mail.com&quot;));

e.AddParticipant(new Participant(
	&quot;Bob&quot;, &quot;bob@mail.com&quot;, ParticipationRole.Required, true));
e.AddParticipant(new Participant(
	&quot;Tom&quot;, &quot;tom@mail.com&quot;, ParticipationRole.Optional, true));
e.AddParticipant(new Participant(
	&quot;Alice&quot;, &quot;alice@mail.com&quot;, ParticipationRole.Required, true));

Alarm alarm = e.AddAlarm();
alarm.BeforeStart(TimeSpan.FromMinutes(15));

Mail.Text(&quot;Status meeting at 4PM.&quot;)
	.Subject(&quot;Status meeting&quot;)
	.From(&quot;alice@mail.com&quot;)
    .To(&quot;bob@mail.com&quot;)
    .AddAppointment(appointment)
    .UsingNewSmtp()
    .WithCredentials(&quot;alice@mail.com&quot;, &quot;password&quot;)
	.Server(&quot;smtp.mail.com&quot;)
	.WithSSL()
	.Send();
</pre>
<p>&#8230;and the VB.NET version:</p>
<pre class="brush: vb;">
Dim appointment As New Appointment()

Dim e As [Event] = appointment.AddEvent()
e.Description = &quot;Status meeting description&quot;
e.Summary = &quot;Status meeting summary&quot;
e.Start = New DateTime(2010, 5, 10, 16, 0, 0)
e.[End] = New DateTime(2010, 5, 10, 17, 0, 0)

e.SetOrganizer(New Person(&quot;Alice&quot;, &quot;alice@mail.com&quot;))

e.AddParticipant(New Participant( _
	&quot;Bob&quot;, &quot;bob@mail.com&quot;, ParticipationRole.Required, True))
e.AddParticipant(New Participant( _
	&quot;Tom&quot;, &quot;tom@mail.com&quot;, ParticipationRole.[Optional], True))
e.AddParticipant(New Participant( _
	&quot;Alice&quot;, &quot;alice@mail.com&quot;, ParticipationRole.Required, True))

Dim alarm As Alarm = e.AddAlarm()
alarm.BeforeStart(TimeSpan.FromMinutes(15))

Mail.Text(&quot;Status meeting at 4PM.&quot;) _
	.Subject(&quot;Status meeting&quot;) _
	.From(&quot;alice@mail.com&quot;) _
	.[To](&quot;bob@mail.com&quot;) _
	.AddAppointment(appointment) _
	.UsingNewSmtp() _
	.WithCredentials(&quot;alice@mail.com&quot;, &quot;password&quot;) _
	.Server(&quot;smtp.mail.com&quot;) _
	.WithSSL() _
	.Send()
</pre>
<p>You can download <a href="http://www.limilabs.com/mail">Mail.dll .NET email component here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.limilabs.com/blog/send-icalendar-meeting-requests/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

