Sending Outlook meeting requests without OutlookWord文件下载.docx
- 文档编号:22088035
- 上传时间:2023-02-02
- 格式:DOCX
- 页数:15
- 大小:150.83KB
Sending Outlook meeting requests without OutlookWord文件下载.docx
《Sending Outlook meeting requests without OutlookWord文件下载.docx》由会员分享,可在线阅读,更多相关《Sending Outlook meeting requests without OutlookWord文件下载.docx(15页珍藏版)》请在冰豆网上搜索。
method=REQUEST,holdsthecontentsoftheicsfile(theheadermethodparametermustmatchthemethodintheics).Watchoutforthecorrecttextencoding,declaringacharsetheaderparameterwon'
thurt.
∙Part3:
Optionally,attachthe.icsfileitself,soordinarymailreaderscanoffertheusersomethingtoclickon.Outlookdoesnotreallyrequiretheattachmentbecauseitjustreadsthetext/calendarpart.
∙Sendthemailtoanoutlookuser.Ifyougoteverythingrightthemailshowsupasameetingrequest,completewithattendancebuttonsandautomaticentryintheuserscalendaruponaccept.
∙Setupsomethingthatprocessestheresponses(theygotothemeetingorganizer).IhavenotyetbeenabletogetautomaticattendeetrackingtoworkwithanExchangemailboxbecausetheeventwon'
texistintheorganizerscalendar.OutlookneedstheUIDsandSEQUENCEStomatchit'
sexpectations,butwithaUIDyoumadeupthiswillhardlywork.
Forhelponthedetailsandpeculiaritiesoftheicsfileformat,besuretovisittheiCalendarSpecificationExcerptsbyMasahideKanzaki.Theyarealightinthedark,muchbetterthangnawingyourwaythroughRFC2445.Butthenagain,maybeahandylibraryexistsfor.NET.
sendingoutlookmeetingrequestthroughapplication
Hi,Ithinkyouoptionsare;
1.createandICSfileontheserverthattheuserdownloads.(manyeventsitedothis).2.IfyouhaveexchangeyoucanuseExchangeDAVorEWStocreateansendmeetingrequest.(thisitproballytheeasiest)SowhatdoyouhaveinyourENVwhatkindofexperianceareyoulookingfor?
isthisjustforoutlookusersetc.–
76melMar30'
10at10:
17
As76melsuggestedanICSfilewillcreateanOutlookcalendarevent(orforanycalendarapplicationthatsupportsiCal)-thereprettysimple-justneedtowriteatextfilewithanICSextensionandamimetypeof"
text/calendar"
:
BEGIN:
VCALENDAR
VERSION:
2.0
PRODID:
YourAppName
METHOD:
PUBLISH
VEVENT
DTSTART:
20100401T000000Z
DTEND:
LOCATION:
Somewhere
UID:
MeetingId
DTSTAMP:
20100330T225528Z
DESCRIPTION:
MeetingTitle
SUMMARY:
MeetingDescription
END:
CreateOutlookTaskRequestfromASP.NET
1downvotefavorite
I'
mlookingforawaytocreateOutlookTaskRequestfromASP.NET.I'
musingExchangeServer2003foremailserver.Basically,userofmyASP.NETapplicationwilldosomethingthatwillcreateOutlookTaskbasedonsomelogic.Isthisnativelysupportedin.NETormustIusethirdpartycomponent?
Introduction
I�mgoingtoshowtwodifferentwaysofsendingtasksprogrammatically.OneisusingtheMicrosoftOutlook11.0ObjectLibraryandtheotherisusingvCalendar.
UsingMicrosoftOutlook11.0ObjectLibrary
ThesimplestoftheseisusingMicrosoft11.0objectlibrary.ThishasaclasscalledTaskItem.TaskItemrepresentsatask(anassigned,delegated,orself-imposedtasktobeperformedwithinaspecifiedtimeframe)inaTasksfolder.Likeappointmentsormeetings,taskscanbedelegated.YoucangetthislibraryfromAddReferenceandclickonCOMtab.
Createanaliasasfollows:
Collapse|CopyCode
usingOutlook=Microsoft.Office.Interop.Outlook;
CreateobjectsofApplicationClassandTaskItemasfollows:
Outlook.ApplicationClassapp=newOutlook.ApplicationClass();
Outlook.TaskItemtsk=(Outlook.TaskItem)
app.CreateItem(Outlook.OlItemType.olTaskItem);
Setthepropertiesoftaskasneeded:
tsk.StartDate=DateTime.Now;
tsk.DueDate=DateTime.Now;
tsk.Subject="
Test"
;
tsk.Body="
TestingTask"
tsk.Recipients.Add("
abc@"
);
tsk.Assign();
tsk.Send();
That�sit.Thisisthesimplestwayforcreatingandsendingataskprogrammatically.Onedisadvantageofthisiswegettoclickawaytheannoyingsecuritypopups.
UsingvCalendar
ThenextwayisthroughthevCalendarobject.vCalendaristheindustrystandardformatforsending/receivingschedulinginformationelectronically.vCalendarwasdevelopedbyaconsortiumformedbyIBM,AT&
T,SiemensandApple.Later,thisspecificationwasgiventoInternetMailConsortium.Now,mostofthePersonalInformationManager(PIM)programsonallsoftwaresupportvCalendarasthestandardexchangeformat.
MicrosoftOutlooksupportsvCalendar(whatmoredowewant;
)).vCalendarfilesarenotjustusedtoexchangeappointmentsandscheduleswithinoneorganization.Theycanbeusedtoscheduleappointmentswithothers,whouseschedulingsoftwareincompatiblewithyours(allthemorewewant,right?
).Let�sgetonwithhowtocreateavCalendarobjectprogrammatically.
vCalendarfilewouldlooksomethinglikethefollowing:
VCALENDARPRODID:
-//MicrosoftCorporation//OutlookMIMEDIR//EN
VERSION:
1.0BEGIN:
VEVENTDTSTART:
19980114T210000ZDTEND:
19980114T230000Z
LOCATION:
TeamRoomCATEGORIES:
Business
DESCRIPTION;
ENCODING=QUOTED-PRINTABLE:
Testing
Task=0D=0ASUMMARY:
TestPRIORITY:
3END:
VEVENTEND:
VCALENDAR
TocreatethevCalendarobject,wehavethemethodgivenbelow:
stringCreateTask(DateTimestart,DateTimeend,stringsub,stringmsgBody)
{
StringBuildersbvCalendar=newStringBuilder();
//Header
sbvCalendar.Append("
REQUEST"
\n"
VCALENDAR"
-//MicrosoftCorporation//Outlook"
MIMEDIR//ENVERSION:
1.0"
VEVENT"
//DTSTART
"
stringhour=start.Hour.ToString();
if(hour.Length<
2){hour="
0"
+hour;
}
stringmin=start.Minute.ToString();
if(min.Length<
2){min="
+min;
stringsec=start.Second.ToString();
if(sec.Length<
2){sec="
+sec;
stringmon=start.Month.ToString();
if(mon.Length<
2){mon="
+mon;
stringday=start.Day.ToString();
if(day.Length<
2){day="
+day;
sbvCalendar.Append(start.Year.ToString()+mon+day
+"
T"
+hour+min+sec);
//DTEND
hour=end.Hour.ToString();
min=end.Minute.ToString();
sec=end.Second.ToString();
mon=end.Month.ToString();
day=end.Day.ToString();
sbvCalendar.Append(end.Year.ToString()+mon+
day+"
//Location
LOCATION;
"
+String.Empty);
//Messagebody
DESCRIPTION;
+msgBody);
//Subject
SUMMARY;
+sub);
//Priority
PRIORITY:
3"
returnsbvCalendar.ToString();
Wecanusethismethodas:
stringsub="
stringbody="
//Createamessageobject
MailMessagemsg=newMailMessage();
msg.From="
msg.To="
def@"
msg.Subject=sub;
msg.BodyEncoding=System.Text.Encoding.UTF8;
msg.Body=body;
//Setthedate/time
DateTimestart=DateTime.Parse("
Jan1,2005"
DateTimeend=DateTime.Parse("
Jan2,2005"
DateTimeex=DateTime.Now;
//LocationwhereyouwanttosavethevCalendarfile
stringattachUrl=
C:
\Inetpub\wwwroot\WebApplication3\bin\Test.vcs"
//Createtask
using(StreamWritersw=newStreamWriter(attachUrl)
sw.Write(CreateTask(start,end,sub,body));
//Attachthetask
MailAttachmentmAttachment=newMailAttachment(attachUrl);
msg.Attachments.Add(mAttachment);
//Send
SmtpMail.SmtpServer="
some-smtp-mail-"
SmtpMail.Send(msg);
That�sit.Happycoding!
SendCalendarAppointmentAsEmailAttachment
Icameacrossascenariowhereameeting/visitschedulehadtobesetinanaspxpageandthesameschedulehadtobesentacrossasacalendarinviteinanemail.Thecalendarfilewastobeanattachmentintheemail.Thisarticlegivesabriefdescriptionoftheproceduretocreateanoutlookcalendarappointment(.ics)fileandsenditthroughemailasanattachmentandalsotocheckifthemethodworkedwithoutactuallyhavingtoconfiguretheSMTPservertosendthemail.
Steps:
Letusdividethissectioninto3broadparts:
ToCreateanOutlookcalendar(.ics)file.
ToAttachthefiletoanEmailme
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Sending Outlook meeting requests without
链接地址:https://www.bdocx.com/doc/22088035.html