Manula Madushanka
Member
- Outlook version
- Email Account
- POP3
Hi,
I am writing an application where it should be able to send an email as a task request and it should be added to the Outlook task list and as well as in to the email list. But here according to the codings I have done the email is sent properly but it is not added to the task list. It is going as just an email. I have used vCalender/vTODO components to create the structure of the Task request even though the specified component is vTODO the task request is send as an email.
Here I have attached my cording.
If anyone knows the solution for this please help.
private string CreateTask(DateTime start, DateTime end, String body, String sub, String status)
{
StringBuilder sbvCalender2 = new StringBuilder();
sbvCalender2.Append("METHOD: REQUEST");
sbvCalender2.Append("\n");
sbvCalender2.Append("BEGIN:VCALENDAR");
sbvCalender2.Append("\n");
sbvCalender2.Append("PRODID:-//ABC Corporation//NONSGML My Product//EN");
sbvCalender2.Append("\n");
//sbvCalender2.Append("BEGIN:VTODO");
sbvCalender2.Append("BEGIN:VEVENT");
sbvCalender2.Append("\n");
sbvCalender2.Append("SEQUENCE:2");
sbvCalender2.Append("\n");
sbvCalender2.Append("UID:uid4@host1.com");
sbvCalender2.Append("\n");
sbvCalender2.Append("ORGANIZER:MAILTO:manula.m@eyepax.com");
sbvCalender2.Append("\n");
sbvCalender2.Append("DUE:20110415T235959");
sbvCalender2.Append("\n");
sbvCalender2.Append("STATUS:NEEDS-ACTION");
sbvCalender2.Append("\n");
sbvCalender2.Append("SUMMARY:Kolkata Kinght Riders");
sbvCalender2.Append("\n");
sbvCalender2.Append("BEGIN:VALARM");
sbvCalender2.Append("\n");
sbvCalender2.Append("ACTION:AUDIO");
sbvCalender2.Append("\n");
sbvCalender2.Append("TRIGGER:19980403T120000");
sbvCalender2.Append("\n");
sbvCalender2.Append("ATTACH;FMTTYPE=audio/basic:http://example.com/pub/audio-files/ssbanner.aud");
sbvCalender2.Append("\n");
sbvCalender2.Append("REPEAT:4");
sbvCalender2.Append("\n");
sbvCalender2.Append("DURATIONT1H");
sbvCalender2.Append("\n");
sbvCalender2.Append("END:VALARM");
sbvCalender2.Append("\n");
//sbvCalender2.Append("END:VTODO");
sbvCalender2.Append("BEGIN:VEVENT");
sbvCalender2.Append("\n");
sbvCalender2.Append("END:VCALENDAR");
MessageBox.Show(sbvCalender2.ToString());
return sbvCalender2.ToString();
}
I am writing an application where it should be able to send an email as a task request and it should be added to the Outlook task list and as well as in to the email list. But here according to the codings I have done the email is sent properly but it is not added to the task list. It is going as just an email. I have used vCalender/vTODO components to create the structure of the Task request even though the specified component is vTODO the task request is send as an email.
Here I have attached my cording.
If anyone knows the solution for this please help.
private string CreateTask(DateTime start, DateTime end, String body, String sub, String status)
{
StringBuilder sbvCalender2 = new StringBuilder();
sbvCalender2.Append("METHOD: REQUEST");
sbvCalender2.Append("\n");
sbvCalender2.Append("BEGIN:VCALENDAR");
sbvCalender2.Append("\n");
sbvCalender2.Append("PRODID:-//ABC Corporation//NONSGML My Product//EN");
sbvCalender2.Append("\n");
//sbvCalender2.Append("BEGIN:VTODO");
sbvCalender2.Append("BEGIN:VEVENT");
sbvCalender2.Append("\n");
sbvCalender2.Append("SEQUENCE:2");
sbvCalender2.Append("\n");
sbvCalender2.Append("UID:uid4@host1.com");
sbvCalender2.Append("\n");
sbvCalender2.Append("ORGANIZER:MAILTO:manula.m@eyepax.com");
sbvCalender2.Append("\n");
sbvCalender2.Append("DUE:20110415T235959");
sbvCalender2.Append("\n");
sbvCalender2.Append("STATUS:NEEDS-ACTION");
sbvCalender2.Append("\n");
sbvCalender2.Append("SUMMARY:Kolkata Kinght Riders");
sbvCalender2.Append("\n");
sbvCalender2.Append("BEGIN:VALARM");
sbvCalender2.Append("\n");
sbvCalender2.Append("ACTION:AUDIO");
sbvCalender2.Append("\n");
sbvCalender2.Append("TRIGGER:19980403T120000");
sbvCalender2.Append("\n");
sbvCalender2.Append("ATTACH;FMTTYPE=audio/basic:http://example.com/pub/audio-files/ssbanner.aud");
sbvCalender2.Append("\n");
sbvCalender2.Append("REPEAT:4");
sbvCalender2.Append("\n");
sbvCalender2.Append("DURATIONT1H");
sbvCalender2.Append("\n");
sbvCalender2.Append("END:VALARM");
sbvCalender2.Append("\n");
//sbvCalender2.Append("END:VTODO");
sbvCalender2.Append("BEGIN:VEVENT");
sbvCalender2.Append("\n");
sbvCalender2.Append("END:VCALENDAR");
MessageBox.Show(sbvCalender2.ToString());
return sbvCalender2.ToString();
}