Problem in setting zone for Sending meeting request from in Exchange RRS feed

  • Question

  • I am using the below code with no luck in time zone. Meeting request is going but timing is not correct. I have below code snippet:

    Dim sc As New SmtpClient()

    Dim msg As New MailMessage() msg.From = New MailAddress(vFromAddress, vFromAddress) msg.[To].Add(New MailAddress(vToAddress, vToAddress)) msg.Subject = vSubject msg.Body = vBody Dim str As New StringBuilder() str.AppendLine("BEGIN:VCALENDAR") str.AppendLine("PRODID:-Event") str.AppendLine("VERSION:2.0") str.AppendLine("METHOD:REQUEST") str.AppendLine("BEGIN:VTIMEZONE") str.AppendLine("TZID:(GMT-06.00) Central Time (US & Canada)") str.AppendLine("X-MICROSOFT-CDO-TZID:11") str.AppendLine("BEGIN:STANDARD") str.AppendLine(String.Format("DTSTART:{0:yyyyMMddTHHmmssZ}", startTime)) str.AppendLine("TZOFFSETFROM:-0600") str.AppendLine("TZOFFSETTO:-0700") str.AppendLine("End:STANDARD") str.AppendLine("End:VTIMEZONE") str.AppendLine("BEGIN:VEVENT") str.AppendLine(String.Format("DTSTART:{0:yyyyMMddTHHmmssZ}", startTime)) str.AppendLine(String.Format("DTSTAMP:{0:yyyyMMddTHHmmssZ}", DateTime.UtcNow)) str.AppendLine(String.Format("DTEND:{0:yyyyMMddTHHmmssZ}", endTime)) str.AppendLine("LOCATION: " & vLocation) str.AppendLine(String.Format("UID:{0}", Guid.NewGuid())) str.AppendLine(String.Format("DESCRIPTION:{0}", msg.Body)) str.AppendLine(String.Format("X-ALT-DESC;FMTTYPE=text/html:{0}", msg.Body)) str.AppendLine(String.Format("SUMMARY:{0}", msg.Subject)) str.AppendLine(String.Format("ORGANIZER:MAILTO:{0}", msg.From.Address)) str.AppendLine(String.Format("ATTENDEE;CN=""{0}"";RSVP=FALSE:mailto:{1}", msg.[To](0).DisplayName, msg.[To](0).Address)) str.AppendLine("BEGIN:VALARM") str.AppendLine("TRIGGER:-PT15M") str.AppendLine("ACTION:DISPLAY") str.AppendLine("DESCRIPTION:Reminder") str.AppendLine("END:VALARM") str.AppendLine("END:VEVENT") str.AppendLine("END:VCALENDAR") Dim ct As New System.Net.Mime.ContentType("text/calendar") ct.Parameters.Add("method", "REQUEST") Dim body As AlternateView = AlternateView.CreateAlternateViewFromString(str.ToString(), ct) msg.AlternateViews.Add(body) sc.Send(msg)

    Pls. let me know what I am missing. Appreciate your quick help.

    • Moved by Amanda Zhu Wednesday, October 22, 2014 9:42 AM
    Tuesday, October 21, 2014 6:57 AM


All replies

  • Hello,

    Thank you for your post.

    Your issue is out of support range of VS General Question forum which mainly discusses the usage issue of Visual Studio IDE such as WPF & SL designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System and Visual Studio Editor.

    I am moving your question to the moderator forum ("Where is the forum for..?"). The owner of the forum will direct you to a right forum.

    Best regards,

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, October 22, 2014 9:42 AM
  • They'll help you over here.

    Microsoft ASP.Net forums




    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

    Thursday, October 23, 2014 1:20 AM