Independentsoft
- any library, any programming language
Home
Purchase
Support
Company
Contact
WebDAV .NET for Exchange
>
Tutorial
> Send meeting request
The following example shows you how to send meeting request.
C# example
using System; using System.Net; using Independentsoft.Webdav.Exchange; using Independentsoft.Webdav.Exchange.ContentClass; namespace Sample { class Program { static void Main(string[] args) { NetworkCredential credential = new NetworkCredential("username", "password"); WebdavSession session = new WebdavSession(credential); session.UserMailbox = "https://myserver/exchange/emailaddress"; Resource resource = new Resource(session); Appointment appointment1 = new Appointment(); appointment1.Subject = "TestMeeting"; appointment1.Body = "Body text."; appointment1.StartDate = DateTime.Now.AddHours(1); appointment1.EndDate = DateTime.Now.AddHours(3); appointment1.ResponseRequested = true; appointment1.IsRecurring = false; appointment1.MeetingStatus = MeetingStatus.Meeting; appointment1.CalendarUID = Guid.NewGuid().ToString(); appointment1.To = "user1@domain.com;user2@domain.com"; appointment1.Cc = "user3@domain.com"; resource.SendMeetingRequest(appointment1); } } }
VB example
Imports System Imports System.Net Imports Independentsoft.Webdav.Exchange Imports Independentsoft.Webdav.Exchange.ContentClass Module Module1 Sub Main(ByVal args() As String) Dim credential As NetworkCredential = New NetworkCredential("username", "password") Dim session As WebdavSession = New WebdavSession(credential) session.UserMailbox = "https://myserver/exchange/emailaddress" Dim resource As Resource = New Resource(session) Dim appointment1 As Appointment = New Appointment appointment1.Subject = "TestMeeting" appointment1.Body = "Body text." appointment1.StartDate = DateTime.Now.AddHours(1) appointment1.EndDate = DateTime.Now.AddHours(3) appointment1.ResponseRequested = True appointment1.IsRecurring = False appointment1.MeetingStatus = MeetingStatus.Meeting appointment1.CalendarUID = Guid.NewGuid().ToString() appointment1.To = "user1@mydomain.com;user2@mydomain.com" appointment1.Cc = "user3@mydomain.com" resource.SendMeetingRequest(appointment1) End Sub End Module