I m using the following to create a calendar invite for outlook for a php script. However the doesn t give me a new line in outlook. Is there a way to do this? Seems silly if you can t!
function addToCalendar($calEmail, $calSubject, $calDesc)
{
$calEmail = [email protected] ;
$description = $calDesc;
$message="BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:REQUEST
BEGIN:VEVENT
DTSTART:20110718T121000Z
DTEND:20110718T131000Z
DTSTAMP:20110525T075116Z
ORGANIZER;CN=TOMS TEST:mailto:[email protected]
UID:12345678
ATTENDEE;PARTSTAT=NEEDS-ACTION;RSVP= TRUE;CN=Yup:mailto:[email protected]
DESCRIPTION New
Line
LOCATION: I AM THE LOCATION
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY: TEST SUMMARY
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR";
$headers = "From: From Name <From Mail>
";
$headers .= "MIME-Version: 1.0
";
$headers .= "Content-Type: text/calendar; method=REQUEST;
";
$headers .= charset="UTF-8" ;
$headers .= "
";
$headers .= "Content-Transfer-Encoding: 7bit";
$subject = "Meeting Subject";
$subject = html_entity_decode($calSubject, ENT_QUOTES, UTF-8 );
if(mail($calEmail, $calSubject, $message, $headers)) {
echo "sent";
}else {
echo "error";
}
}
It s the DESCRIPTION New
Line
part i m having issues with.
任何帮助都将受到高度赞赏。
纽约总部