Como criar um link vCard/vCalendar e tê-lo baixado para MS Outlook?

Use <cfcontent> e <cfheader> para definir o MIME e os tipos de header apropriados, then include the appropriate fields and data. If MS Outlook is installed on the client, it will receive the data as a vCard!

O exemp.o abaixo de vCard estático foi achado na Internet. Ele pode ser usado com o template para substituir com os seus próprios dados dinâmicos.

<cfcontent type="text/x-vCalendar"> 
<cfheader name="Content-Disposition" value="inline; filename=newAppointment.vcs"> 
BEGIN:VCARD
VERSION:3.0
N;charset=iso-8859-1:Geuzaine;Christophe
BDAY;value=date:1973-02-06
EMAIL;type=HOME:[email protected]
URL;type=HOME:http://www.geuz.org
TITLE;charset=iso-8859-1:Postdoctoral Scholar
ORG;charset=iso-8859-1:Caltech, Applied and Computational Mathematics
ADR;type=WORK;charset=iso-8859-1:;;1200 E California Blvd;Pasadena;CA;91125;USA
TEL;type=WORK:1 626 395 4552
URL;type=WORK:http://www.acm.caltech.edu
END:VCARD
BEGIN:VCARD
VERSION:3.0
N;charset=iso-8859-1:Knudson;Donald Ernest
BDAY;value=date:01-29
TEL;type=HOME:+01-(0)2-234.56.78
EMAIL;type=HOME:[email protected]
NOTE;charset=iso-8859-1:1952 Permafrost Press Award winner
END:VCARD
BEGIN:VCARD
VERSION:3.0
N;charset=iso-8859-1:Knudson;Daffy Duck (with Bugs Bunny and Mr. Pluto)
NICKNAME;charset=iso-8859-1:gnat and gnu and pluto
BDAY;value=date:02-10;11-05;01-01
TEL;type=HOME:+01-(0)2-765.43.21
TEL;type=CELL:+01-(0)5-555.55.55
ACCOUNT;type=HOME:010-1234567-05
ADR;type=HOME;charset=iso-8859-1:;;Haight Street 512;Novosibirsk;;80214;Gnuland
TEL;type=HOME:+01-(0)2-876.54.32
ORG;charset=iso-8859-1:University of Novosibirsk, Department of Octopus Parthenogenesis
END:VCARD
BEGIN:VCARD
VERSION:3.0
N;charset=iso-8859-1:Knudson;Bip B.
NICKNAME;charset=iso-8859-1:road runner
BDAY;value=date:02-27
ADR;type=HOME;charset=iso-8859-1:;;Somewhere close to a falling rock;;;;
EMAIL;type=HOME:[email protected]
END:VCARD
BEGIN:VCARD
VERSION:3.0
N;charset=iso-8859-1:Microknud Corp.;
ADR;type=WORK;charset=iso-8859-1:;;Haight Street 513;Novosibirsk;;80214;Gnuland
TEL;type=WORK:+01-(0)2-465.83.99
TEL;type=FAX:005.79.00
URL:http://foo.com/index.html
END:VCARD
BEGIN:VCARD
VERSION:3.0
N;charset=iso-8859-1:The Knudsoft Company;
EMAIL:[email protected]
URL:http://foo.com/index.htm
END:VCARD
BEGIN:VCARD
VERSION:3.0
N;charset=iso-8859-1:Knudsoft (RS.2 Computer Room);
TEL;type=WORK:+01-(0)2-434.23.23
END:VCARD

by Jeremy Petersen

Leave a comment