|
How do I handle sending and receiving Appointments? I know for sending, the eml data should be stored in an AlternateView with the content type set to text/calendar, but for some reason it's not working for me. Can someone shine some light toward helping me with this??? Thanks! |
|
To construct a calendar appointment, the following C# code can be used:
To load and a calendar appointment and display its data, this should work:
If it still doesn't work for you, please let us know. Thanks, but instead of saving the message can I email it to someone? For example if I email the message to someone and they receive in outlook it will add the appointment to their calendar.
(04 Feb '11, 02:47)
P-Money
Yes, you can do that easily. Instead of calling the Save method, just send the message using Smtp object, as described in the following tutorials: http://www.rebex.net/secure-mail.net/tutorial-smtp.aspx#sending-mail
(04 Feb '11, 12:12)
Lukas Pokorny ♦♦
Hey I finally got chance to try your code and it works for the most part. I can send the appointments to outlook, but the content type of the email is being sent as "multipart/alternative"... How do I change this to get it to show up as text/calendar??? Please help!
(14 Feb '11, 14:54)
P-Money
Only the content type of the root MIME entity of the email is "multipart/alternative" - the last of its sub-entities is actually "text/calendar". This structure corresponds to calendar appointments generated by third-party software. However, in case you only need the text/calendar entity, I have added a separate answer for that.
(14 Feb '11, 22:16)
Lukas Pokorny ♦♦
|
|
In case you prefer a message with a single
The Again, instead of saving the Okay, thanks that worked. But my issue now is that when I send the appointment to outlook, outlook doesn't display it the same (displaying an accept, decline and etc). Nor does outlook add the appointment to the calendar. Do you have any insight on this? And I do appreciate all your help, thanks!
(15 Feb '11, 16:54)
P-Money
Is there a way to convert the string appointmentData above to an Appointment?
(17 Feb '11, 14:12)
P-Money
|
|
The problem was the
Please note the line |