Php Vcard shows empty on outlook

I am trying to create a vcard link download that creates the vcard on-the-fly.

if(isset($_POST)){
header("Content-type: text/vcard");
header("Content-Disposition: attachment; filename=" . get_the_title() . ".vcf");
$content = "\rBEGIN:VCARD\r";
$content .= "VERSION:2.1\r";
$content .= "N:Vicon;Barry;S.\r";
$content .= "FN:Barry S. Vicon\r";
$content .= "ORG:sample\r";
$content .= "TITLE:Partner\r";
$content .= "NOTE;ENCODING=QUOTED-PRINTABLE:    =0D=0A\r";
$content .= "TEL;WORK;VOICE:(516) 999-9999\r";
$content .= "TEL;WORK;FAX:(516) 999-9999\r";
$content .= "URL;WORK:http://www.sample.com\r";
$content .= "EMAIL;PREF;INTERNET:bcohen@sample.com\r";
$content .= "REV:TZ\r";
$content .= "END:VCARD";
echo $content;
}

the file downloads fine and the file format is correct as well but when opened in outlook, not a single info is imported.

here is the output file of the_title.vcf

BEGIN:VCARD
VERSION:2.1
N:Vicon;Barry;S.
FN:Barry S. Vicon
ORG:sample
TITLE:Partner
NOTE;ENCODING=QUOTED-PRINTABLE: =0D=0A
TEL;WORK;VOICE:(516) 999-9999
TEL;WORK;FAX:(516) 999-9999
URL;WORK:http://www.sample.com
EMAIL;PREF;INTERNET:bcohen@sample.com
REV:TZ
END:VCARD

another pre-existing vcard has the exact same info and everything seems to be working when outlook opens that file.

what am I missing here?

Answers


$content = "BEGIN:VCARD\n\r";

Solves the issue. thanks to Marc's comment


Need Your Help

How do I change gamma of my second monitor with XF86VidModeSetGamma()?

c++ c linux sdl

I've written a small function to change the gamma value of my monitor, but unfortunately it changes the gamma exactly of the wrong monitor, where I don't need it.

sublime-text 2 ftpsync ignore not working

sublimetext2 sublimetext sublime-text-plugin

In my yii project on windows 7 I have the following structure:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.