Changeset 4138
- Timestamp:
- 04/26/11 10:11:55 (13 years ago)
- Location:
- branches/2.2.0.1
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.0.1/calendar/inc/class.bocalendar.inc.php
r3998 r4138 3015 3015 return null; 3016 3016 3017 $sender = $GLOBALS['phpgw_info']['user']['email']; 3018 $uid_dono = $GLOBALS['phpgw_info']['user']['account_lid']; 3017 3019 $tmpattach="BEGIN:VCALENDAR\n" 3018 3020 ."PRODID:-//Expresso Livre//Calendar//EN\n" … … 3040 3042 ."DTEND:".$end_time."\r\n" 3041 3043 ."LAST-MODIFIED:".gmdate("Ymd\THis\Z")."\r\n" //Hora no formato UTC 3042 ."UID:Expresso-".$event['id'].$event['uid']."\r\n" 3044 //."UID:Expresso-".$event['id'].$event['uid']."\r\n" 3045 ."UID:Expresso-".$event[id]."@".$uid_dono."\n" 3043 3046 ."DESCRIPTION:".$description."\r\n" 3044 3047 ."SUMMARY:".$event['title']."\r\n" 3045 3048 ."LOCATION:".$event['location']."\r\n" 3046 ."END:VEVENT\r\n"; 3049 ."ORGANIZER:mailto:".$sender."\n"; 3050 $expart=preg_split('/,/', $event['ex_participants']); 3051 3052 foreach ($expart as $mail) 3053 { 3054 if($mail != "") 3055 { 3056 $tmpattach.="ATTENDEE;RSVP=TRUE;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT:mailto:".$mail."\n"; 3057 } 3058 } 3059 3060 while (list($id,$status) = each($event['participants'])) 3061 { 3062 3063 $preferences = CreateObject('phpgwapi.preferences',$id); 3064 $mail = $preferences->email_address($id); 3065 if ( $sender != $mail) 3066 { 3067 if($status == 'U' ){ 3068 $tmpattach.="ATTENDEE;RSVP=TRUE;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT:mailto:".$mail."\n"; 3069 } 3070 elseif($status == 'A' ){ 3071 $tmpattach.="ATTENDEE;RSVP=TRUE;PARTSTAT=ACCEPTED;ROLE=REQ-PARTICIPANT:mailto:".$mail."\n"; 3072 } 3073 elseif($status == 'T' ){ 3074 $tmpattach.="ATTENDEE;RSVP=TRUE;PARTSTAT=TENTATIVE;ROLE=REQ-PARTICIPANT:mailto:".$mail."\n"; 3075 } 3076 else 3077 { 3078 $tmpattach.="ATTENDEE;RSVP=TRUE;PARTSTAT=DECLINED;ROLE=REQ-PARTICIPANT:mailto:".$mail."\n"; 3079 } 3080 } 3081 } 3082 $tmpattach.="END:VEVENT"."\n"; 3083 //."END:VEVENT\r\n"; 3047 3084 } 3048 3085 $tmpattach.="END:VCALENDAR\r\n"; … … 3201 3238 $mail->From = $GLOBALS['phpgw']->preferences->values['email']; 3202 3239 $mail->FromName = $GLOBALS['phpgw_info']['user']['fullname']; 3203 $mail->IsHTML(true); 3240 //$mail->IsHTML(true); 3241 $mail->IsCalendar(true); 3204 3242 3205 3243 // Aqui e enviado o email … … 3462 3500 } 3463 3501 $mail->AddAddress($to); 3464 $mail->Body = $tmpbody; 3465 $mail->From = $sender; 3502 //$mail->Body = $tmpbody; 3503 $tmpattach_n = $this->create_vcard($GLOBALS['bocalendar']->so->cal->event); 3504 $tmpattach = str_replace("Expresso-","",$tmpattach_n); 3505 $mail->Body = "This is a multi-part message in MIME format."; 3506 $mail->Body .= "\n--01BD3665.3AF0D360\n"; 3507 $mail->Body .= "Content-Type: text/html; charset=\"iso-8859-1\"\nContent-Transfer-Encoding: 8bit\n"; 3508 $mail->Body .= $tmpbody; 3509 $mail->Body .= "\n--01BD3665.3AF0D360\n"; 3510 $mail->Body .="Content-Type:text/calendar; method=REQUEST; charset=US-ASCII\nContent-Transfer-Encoding:7bit\n\n"; 3511 $mail->Body .= $tmpattach; 3512 $mail->Body .= "\n--01BD3665.3AF0D360--\n"; 3513 $mail->From = $sender; 3466 3514 $mail->FromName = $GLOBALS['phpgw_info']['user']['fullname']; 3467 3515 $mail->Sender = $mail->From; … … 3494 3542 $mail->ClearAllRecipients(); 3495 3543 $var = explode(",",trim($this->ex_participants)); 3544 $mail->IsHTML(true); 3496 3545 $to = array(); 3497 3546 if(!$subject) { -
branches/2.2.0.1/phpgwapi/inc/class.phpmailer.inc.php
r2 r4138 234 234 * @return void 235 235 */ 236 function Iscalendar($bool) { 237 if($bool == true) 238 $this->ContentType = "multipart/alternative;\n boundary=\"01BD3665.3AF0D360\"\n"; 239 else 240 $this->ContentType = "text/plain"; 241 } 242 236 243 function IsHTML($bool) { 237 244 if($bool == true)
Note: See TracChangeset
for help on using the changeset viewer.