Lotus Notes - iCal sobre PHP al enviar reunion no me pone invitado como obligatorio

   
Vista:

iCal sobre PHP al enviar reunion no me pone invitado como obligatorio

Publicado por martin martin.ramozd@gmail.com (1 intervención) el 20/09/2012 22:09:39
buen dia, de casualidad alguien sabra como solucionar el siguiente error:

utilizando la funcion phpmailer envio una invitacion a una reunion a 1 solo correo (imagino ke tendria ke hacer un for para envio de diversas cuentas) y funciona correctamente solamente que al correo al que lo envio (siendo el mio el mismo que envia y recibe) al abrir la invitacion me llega como "FYI" no como obligarotio estube investigando y va con la variable attendee mas sin embargo no puedo hacer que me llegue como Obligatorio

a continuacion adjunto mi codigo...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
<?PHP

//$firstname is the first name of target
//$lastname is the last name of target
//$email is the targets email address
//$meeting_date is straight from a DATETIME mysql field and assumes UTC.
//$meeting_name is the name of your meeting
//$meeting_duretion is the duration of your meeting in seconds (3600 = 1 hour)

FUNCTION sendIcalEmail($firstname,$lastname,$email,$meeting_date,$meeting_name,$meeting_duration) {

//quien lo envia
$from_name = "nombre de quien lo envia";
$from_address = "administrador@admin.com";
$subject = $meeting_name;
$meeting_description = "Descripcion de la Reunion\n\n";
$meeting_location = "Oficina";


//Convert MYSQL datetime and construct iCal start, end and issue dates
$meetingstamp = STRTOTIME($meeting_date . " UTC");
$dtstart= GMDATE("Ymd\THis\Z",$meetingstamp);
$dtend= GMDATE("Ymd\THis\Z",$meetingstamp+$meeting_duration);
$todaystamp = GMDATE("Ymd\THis\Z");

//Create unique identifier
$cal_uid = DATE('Ymd').'T'.DATE('His')."-".RAND()."@wicor.com";

//Create Mime Boundry
$mime_boundary = "----Meeting Booking----".MD5(TIME());

//Create Email Headers
$headers = "From: ".$from_name." <".$from_address.">\n";
$headers .= "Reply-To: ".$from_name." <".$from_address.">\n";

$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Type: multipart/alternative; boundary=\"$mime_boundary\"\n";
$headers .= "Content-class: urn:content-classes:calendarmessage\n";

//Create Email Body (HTML)
$message = "--$mime_boundary\n";
$message .= "Content-Type: text/calendar;name='meeting.ics';method=REQUEST;charset=utf-8\n";
$message .= "Content-Transfer-Encoding: 8bit\n\n";

$message .= "<html>\n";
$message .= "<body>\n";
$message .= '<p>Dear '.$firstname.' '.$lastname.',</p>';
$message .= '<p>Here is my HTML Email / Used for Meeting Description</p>';
$message .= "</body>\n";
$message .= "</html>\n";
$message .= "--$mime_boundary\n";

//Create ICAL Content (Google rfc 2445 for details and examples of usage)
$ical = '
BEGIN:VCALENDAR
X-LOTUS-CHARSET:UTF-8
VERSION:2.0
PRODID:-//Lotus Development Corporation//NONSGML Notes 8.5.2//EN_C
METHOD:REQUEST
BEGIN:VTIMEZONE
TZID:Central Standard Time (Mexico)
BEGIN:STANDARD
DTSTART:19501029T020000
TZOFFSETFROM:-0500
TZOFFSETTO:-0600
RRULE:FREQ=YEARLY;BYMINUTE=0;BYHOUR=2;BYDAY=-1SU;BYMONTH=10
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:19500402T020000
TZOFFSETFROM:-0600
TZOFFSETTO:-0500
RRULE:FREQ=YEARLY;BYMINUTE=0;BYHOUR=2;BYDAY=1SU;BYMONTH=4
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
DTSTART;TZID="Central Standard Time (Mexico)":20120919T100000
DTEND;TZID="Central Standard Time (Mexico)":20120919T110000
TRANSP:OPAQUE
DTSTAMP:20120919T131132Z
CLASS:PUBLIC
DESCRIPTION:
SUMMARY:Test
LOCATION:'.$meeting_location.'
ORGANIZER:CN='.$from_address.'

ATTENDEE;PARTSTAT=NEEDS-ACTION;RSVP= TRUE;CN='.$email.' //(COMO QUE POR AKI VA EL ERROR )

DTSTART;TZID="Central Standard Time (Mexico)":'.$dtstart.'
DTEND;TZID="Central Standard Time (Mexico)":'.$dtend.'
LOCATION:'.$meeting_location.'
TRANSP:OPAQUE
SEQUENCE:0
UID:'.$cal_uid.'
DTSTAMP:'.$todaystamp.'
DESCRIPTION:'.$meeting_description.'
SUMMARY:'.$subject.'
PRIORITY:5
CLASS:PUBLIC
END:VEVENT
END:VCALENDAR';

$message .= 'Content-Type: text/calendar;name="meeting.ics";method=REQUEST\n';
$message .= "Content-Transfer-Encoding: 8bit\n\n";
$message .= $ical;

//SEND MAIL
$mail_sent = @MAIL( $email, $subject, $message, $headers );

IF($mail_sent) {
RETURN TRUE;
} ELSE {
RETURN FALSE;
}

}


?>
</head>

<body>
<?PHP

//$firstname is the first name of target
//$lastname is the last name of target
//$email is the targets email address
//$meeting_date is straight from a DATETIME mysql field and assumes UTC.
//$meeting_name is the name of your meeting
//$meeting_duration is the duration of your meeting in seconds (3600 = 1 hour)
$firstname = "nombre";
$lastname = "apellido";
$email = "correo@abc.com";

$meeting_date = "2010-07-06 13:40:00"; //mysql format
$meeting_name = "Titulo de la reunion!";
$meeting_duration = 3600;

//returns true or false
$result = sendIcalEmail($firstname,$lastname,$email,$meeting_date,$meeting_name,$meeting_duration);

//display result
IF($result) {
ECHO "Email sent successfully.";
} ELSE {
ECHO "A problem occurred sending email";
}

?>
</body>
</html>


de antemano gracias! = aun no sea la respuesta exacta pero algo que me ayude un poco.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder