diff -uNr expresso-2.2/calendar/inc/class.bocalendar.inc.php expressov2/calendar/inc/class.bocalendar.inc.php
old
|
new
|
|
2740 | 2740 | { |
2741 | 2741 | if(!is_array($event_array)) |
2742 | 2742 | return null; |
2743 | | $tmpattach="BEGIN:VCALENDAR\n" |
| 2743 | $sender = $GLOBALS['phpgw_info']['user']['email']; |
| 2744 | $uid_dono = $GLOBALS['phpgw_info']['user']['account_lid']; |
| 2745 | $tmpattach="BEGIN:VCALENDAR\n" |
2744 | 2746 | ."PRODID:-//Expresso Livre//Calendar//EN\n" |
2745 | 2747 | ."VERSION:1.0\n"; |
2746 | 2748 | foreach ($event_array as $event) |
… |
… |
|
2786 | 2788 | $tmpattach.="BEGIN:VEVENT\n" |
2787 | 2789 | ."DTSTART:".$event['start'][year].$start_event_month.$start_event_day."T".$start_event_hour.$start_event_min."00Z\n" |
2788 | 2790 | ."DTEND:".$event[end][year].$end_event_month.$end_event_day."T".$end_event_hour.$end_event_min."00Z\n" |
2789 | | ."UID:Expresso-".$event[id].$event[uid]."\n" |
| 2791 | //."UID:Expresso-".$event[id].$event[uid]."\n" |
| 2792 | ."UID:Expresso-".$event[id]."@".$uid_dono."\n" |
2790 | 2793 | ."LAST-MODIFIED:".time()."\n" |
2791 | 2794 | ."DESCRIPTION:".$event[description]."\n" |
2792 | 2795 | ."SUMMARY:".$event[title]."\n" |
2793 | 2796 | ."LOCATION:".$event[location]."\n" |
| 2797 | ."ORGANIZER;RSVP=TRUE;PARTSTAT=ACCEPTED;ROLE=CHAIR:mailto:".$sender."\n" |
| 2798 | ."ATTENDEE;RSVP=TRUE;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT:mailto:".$event[ex_participants]."\n" |
2794 | 2799 | ."END:VEVENT"."\n"; |
2795 | 2800 | } |
2796 | 2801 | $tmpattach.="END:VCALENDAR\n"; |
… |
… |
|
2950 | 2955 | $mail->Port = $emailadmin['smtpPort']; |
2951 | 2956 | $mail->From = $GLOBALS['phpgw']->preferences->values['email']; |
2952 | 2957 | $mail->FromName = $GLOBALS['phpgw_info']['user']['fullname']; |
2953 | | $mail->IsHTML(true); |
| 2958 | //$mail->IsHTML(true); |
| 2959 | $mail->IsCalendar(true); |
2954 | 2960 | |
2955 | 2961 | // Aqui ᅵ enviado o email |
2956 | 2962 | foreach($to_notify as $userid => $statusid) |
… |
… |
|
3202 | 3208 | break; |
3203 | 3209 | } |
3204 | 3210 | $mail->AddAddress($to); |
3205 | | $mail->Body = $tmpbody; |
| 3211 | //$mail->Body = $tmpbody; |
| 3212 | $tmpattach_n = $this->create_vcard($GLOBALS['bocalendar']->so->cal->event); |
| 3213 | $tmpattach_a = str_replace("Expresso-","",$tmpattach_n); |
| 3214 | $tmpattach=str_replace("ATTENDEE;RSVP=TRUE;PARTSTAT=NEEDS-ACTION;ROLE=REQPARTICIPANT:mailto:","ATTENDEE;RSVP=TRUE;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT:mailto:".$to,$tmpattach_a); |
| 3215 | $mail->Body = "This is a multi-part message in MIME format."; |
| 3216 | $mail->Body .= "\n--01BD3665.3AF0D360\n"; |
| 3217 | $mail->Body .= "Content-Type: text/html; charset=\"iso-8859-1\"\nContent-Transfer-Encoding: 8bit\n"; |
| 3218 | $mail->Body .= $tmpbody; |
| 3219 | $mail->Body .= "\n--01BD3665.3AF0D360\n"; |
| 3220 | $mail->Body.="Content-Type:text/calendar; method=REQUEST; charset=US-ASCII\nContent-Transfer-Encoding:7bit\n\n"; |
| 3221 | $mail->Body .= $tmpattach; |
| 3222 | $mail->Body .= "\n--01BD3665.3AF0D360--\n"; |
3206 | 3223 | $mail->From = $sender; |
3207 | 3224 | $mail->FromName = $GLOBALS['phpgw_info']['user']['fullname']; |
3208 | 3225 | $mail->Sender = $mail->From; |
… |
… |
|
3228 | 3245 | if(count($to_notify) && $this->ex_participants){ |
3229 | 3246 | $mail->ClearAllRecipients(); |
3230 | 3247 | $var = explode(",",trim($this->ex_participants)); |
| 3248 | $mail->IsHTML(true); |
3231 | 3249 | $to = array(); |
3232 | 3250 | if(!$subject) { |
3233 | 3251 | $details['startdate'] = $GLOBALS['phpgw']->common->show_date($starttime); |
diff -uNr expresso-2.2/phpgwapi/inc/class.phpmailer.inc.php expressov2/phpgwapi/inc/class.phpmailer.inc.php
old
|
new
|
|
243 | 243 | * @param bool $bool |
244 | 244 | * @return void |
245 | 245 | */ |
| 246 | function Iscalendar($bool) { |
| 247 | if($bool == true) |
| 248 | $this->ContentType = "multipart/alternative;\n boundary=\"01BD3665.3AF0D360\"\n"; |
| 249 | else |
| 250 | $this->ContentType = "text/plain"; |
| 251 | } |
246 | 252 | function IsHTML($bool) { |
247 | 253 | if($bool == true) |
248 | 254 | $this->ContentType = "text/html"; |