CreateMeetingRequestMime() static private method

Create a meeting request mime
static private CreateMeetingRequestMime ( string from, string to, string subject, string body, string icalendarContent ) : string
from string The from address of mail
to string The to address of the mail
subject string The subject of the mail
body string The body content of the mail
icalendarContent string The content of iCalendar required by this meeting
return string
Example #1
0
        /// <summary>
        /// Send a meeting request email.
        /// </summary>
        /// <param name="subject">The subject of email</param>
        /// <param name="calendar">The meeting calendar</param>
        private void SendMeetingRequest(string subject, Calendar calendar)
        {
            string emailBody = Common.GenerateResourceName(Site, "content");
            string icalendarFormatContent = TestSuiteHelper.CreateiCalendarFormatContent(calendar);

            string meetingEmailMime = TestSuiteHelper.CreateMeetingRequestMime(
                calendar.OrganizerEmail,
                calendar.Attendees.Attendee[0].Email,
                subject,
                emailBody,
                icalendarFormatContent);

            Request.SendMail sendMail = new Request.SendMail();

            sendMail.ClientId = Guid.NewGuid().ToString("N");
            sendMail.Mime     = meetingEmailMime;

            SendMailRequest sendMailRequest = Common.CreateSendMailRequest();

            sendMailRequest.RequestData = sendMail;

            this.SwitchUser(this.User1Information, false);
            SendMailResponse response = this.ASAIRSAdapter.SendMail(sendMailRequest);

            Site.Assert.AreEqual <string>(
                string.Empty,
                response.ResponseDataXML,
                "The server should return an empty xml response data to indicate SendMail command success.");
        }