diff -uNr expresso/calendar/inc/class.bocalendar.inc.php expressov2/calendar/inc/class.bocalendar.inc.php
old
|
new
|
|
2643 | 2643 | |
2644 | 2644 | function create_vcard($event_array) |
2645 | 2645 | { |
| 2646 | $sender = $GLOBALS['phpgw_info']['user']['email']; |
| 2647 | $uid_dono = $GLOBALS['phpgw_info']['user']['account_lid']; |
2646 | 2648 | if(!is_array($event_array)) |
2647 | 2649 | return null; |
2648 | 2650 | |
… |
… |
|
2671 | 2673 | ."DTSTART:".$dtstart."\r\n" |
2672 | 2674 | ."DTEND:".$dtend."\r\n" |
2673 | 2675 | ."LAST-MODIFIED:".gmdate("Ymd\THis\Z")."\r\n" //Hora no formato UTC |
2674 | | ."UID:Expresso-".$event_array['id'].$event_array['uid']."\r\n" |
| 2676 | //."UID:Expresso-".$event_array['id'].$event_array['uid']."\r\n" |
| 2677 | ."UID:Expresso-".$event[id]."@".$uid_dono."\n" |
2675 | 2678 | ."DESCRIPTION:".$description."\r\n" |
2676 | 2679 | ."SUMMARY:".$event_array['title']."\r\n" |
2677 | 2680 | ."LOCATION:".$event_array['location']."\r\n" |
| 2681 | ."ORGANIZER;RSVP=TRUE;PARTSTAT=ACCEPTED;ROLE=CHAIR:mailto:".$sender."\n" |
| 2682 | ."ATTENDEE;RSVP=TRUE;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT:mailto:".$event[ex_participants]."\n" |
2678 | 2683 | ."END:VEVENT\r\n" |
2679 | 2684 | ."END:VCALENDAR\r\n"; |
2680 | 2685 | |
… |
… |
|
2832 | 2837 | $mail->Port = $emailadmin['smtpPort']; |
2833 | 2838 | $mail->From = $GLOBALS['phpgw']->preferences->values['email']; |
2834 | 2839 | $mail->FromName = $GLOBALS['phpgw_info']['user']['fullname']; |
2835 | | $mail->IsHTML(true); |
| 2840 | //$mail->IsHTML(true); |
| 2841 | $mail->IsCalendar(true); |
2836 | 2842 | |
2837 | 2843 | // Aqui e enviado o email |
2838 | 2844 | foreach($to_notify as $userid => $statusid) |
… |
… |
|
3077 | 3083 | break; |
3078 | 3084 | } |
3079 | 3085 | $mail->AddAddress($to); |
3080 | | $mail->Body = $tmpbody; |
| 3086 | //$mail->Body = $tmpbody; |
| 3087 | $tmpattach_n = $this->create_vcard($GLOBALS['bocalendar']->so->cal->event); |
| 3088 | $tmpattach_a = str_replace("Expresso-","",$tmpattach_n); |
| 3089 | $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); |
| 3090 | $mail->Body = "This is a multi-part message in MIME format."; |
| 3091 | $mail->Body .= "\n--01BD3665.3AF0D360\n"; |
| 3092 | $mail->Body .= "Content-Type: text/html; charset=\"iso-8859-1\"\nContent-Transfer-Encoding: 8bit\n"; |
| 3093 | $mail->Body .= $tmpbody; |
| 3094 | $mail->Body .= "\n--01BD3665.3AF0D360\n"; |
| 3095 | $mail->Body.="Content-Type:text/calendar; method=REQUEST; charset=US-ASCII\nContent-Transfer-Encoding:7bit\n\n"; |
| 3096 | $mail->Body .= $tmpattach; |
| 3097 | $mail->Body .= "\n--01BD3665.3AF0D360--\n"; |
3081 | 3098 | $mail->From = $sender; |
3082 | 3099 | $mail->FromName = $GLOBALS['phpgw_info']['user']['fullname']; |
3083 | 3100 | $mail->Sender = $mail->From; |
… |
… |
|
3103 | 3120 | if(count($to_notify) && $this->ex_participants){ |
3104 | 3121 | $mail->ClearAllRecipients(); |
3105 | 3122 | $var = explode(",",trim($this->ex_participants)); |
3106 | | $to = array(); |
| 3123 | $mail->IsHTML(true); |
| 3124 | $to = array(); |
3107 | 3125 | if(!$subject) { |
3108 | 3126 | $details['startdate'] = $GLOBALS['phpgw']->common->show_date($starttime); |
3109 | 3127 | $details['enddate'] = $GLOBALS['phpgw']->common->show_date($endtime); |
diff -uNr expresso/phpgwapi/inc/class.phpmailer.inc.php expressov2/phpgwapi/inc/class.phpmailer.inc.php
old
|
new
|
|
233 | 233 | * @param bool $bool |
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 | } |
236 | 242 | function IsHTML($bool) { |
237 | 243 | if($bool == true) |
238 | 244 | $this->ContentType = "text/html"; |