hi michael,

the uid seems to be too long for outlook, try
using the date-function to create the uid like in the example:

$uid = date('Ymd').'T'.date('His')."-".rand()."@foo.com";

regards
sebastian keßler


2009/10/12 Tridem GmbH, [email protected] <[email protected]>

>  Hi Sebastian, thanks for the answer.
>
> According to your change I have the following script. Still Outlook 2007
> tells me the icalendar is unsupporten:/
>
>
>
> Any ideas?!
>
>
>
> $mail = new Zend_Mail('utf-8');
>
> $mail->setFrom('[email protected]', 'Technik');
>
> $mail->addTo('[email protected]');
>
> $mail->setSubject('My Calendar Message Subject');
>
> #$mail->addHeader('content-class', 'urn:content-classes:calendarmessage');
>
> #$mail->addHeader('content-description', 'My Calendar Message
> Filename.ics');
>
> $mail->setBodyText('My Calendar Message Body Text', 'utf-8',
> Zend_Mime::DISPOSITION_INLINE);
>
>
>
> $ical = "BEGIN:VCALENDAR\n";
>
> $ical .= "PRODID:-//Microsoft Corporation//Outlook 11.0 MIMEDIR//EN
>
>                 VERSION:2.0
>
>                 METHOD:PUBLISH
>
>                 BEGIN:VEVENT
>
>                 ORGANIZER:MAILTO:[email protected]
>
>                 DTSTART:20060306T050000Z
>
>                 DTEND:20060306T053000Z
>
>                 LOCATION:location
>
>                 TRANSP:OPAQUE
>
>                 SEQUENCE:0
>
>
> UID:040000008200E00074C5B7101A82E0080000000020DC2A139243C601000000000000000
>
>                  00000DEF81CB498E1594B90378312C3D6551D
>
>                 DTSTAMP:20060309T045649Z
>
>                 DESCRIPTION:FreeFormText.\nMore FreeFormText.\n\n
>
>                 SUMMARY:subject
>
>                 PRIORITY:5
>
>                 X-MICROSOFT-CDO-IMPORTANCE:1
>
>                 CLASS:PUBLIC
>
>                 END:VEVENT
>
>                 END:VCALENDAR
>
> ";
>
>
>
> $at = new Zend_Mime_Part($ical);
>
> $at->type = 'text/calendar';
>
> #$at->type = 'text/calendar; method=REQUEST; name=\"subject.ics\"';
>
> $at->disposition = Zend_Mime::DISPOSITION_INLINE;
>
> $at->encoding = Zend_Mime::ENCODING_8BIT;
>
> $at->filename = 'My Calendar Message Filename.ics';
>
>
>
>
>
> $mail->addAttachment($at);
>
>
>
> $mail->send();
>
>
>
> Zend_Debug::dump($mail);
>
>
>
> Regards
>
> Michael Borchers
>
>
>
> *Von:* Sebastian Keßler [mailto:[email protected]]
> *Gesendet:* Montag, 12. Oktober 2009 08:32
> *An:* Tridem GmbH, [email protected]
> *Cc:* [email protected]
> *Betreff:* Re: [fw-general] Sending iCal using Zend_Mail
>
>
>
> you could do it by creating a mime-part
> and add it as attachement.
>
> $ical .= "BEGIN:VCALENDAR\n";
> ...
>
> $at = new Zend_Mime_Part($ical);
> $at->type = 'text/calendar"';
> $at->disposition = Zend_Mime::DISPOSITION_INLINE;
> $at->encoding = Zend_Mime::ENCODING_8BIT;
> $at->filename = 'termin.ics';
>
> $mail->addAttachment($at);
>
> if disposition is set to inline, it will open directly
> as calendar-request.
>
> outlook (2003, 2007) always shows the "accept" and "deny"
> buttons, the "method=publish" has no effect in
> disposition-inline. i could not get any information
> about the internal outlook implementation of iCalendar.
>
> regards,
> sebastian keßler
>
>  2009/10/9 Tridem <[email protected]>
>
>
> I found this function which perfectely sends meeting requests for outlook
> in
> icalendar format:
> [URL="http://swik.net/PHP/PHP+Code+Snippets/PHP+iCal+Email/c1jfi";]
> http://swik.net/PHP/PHP+Code+Snippets/PHP+iCal+Email/c1jfi[/URL]<http://swik.net/PHP/PHP+Code+Snippets/PHP+iCal+Email/c1jfi%5B/URL%5D>
>
> The only problem is that I can't get it working with Zend_Mail.
>
> The difficulty is setting the correct headers since the main methods
> setBodyText() and setBodyHtml() set their own.
>
> Using attachments wasn't successful either.
>
> Any idea to achieve the correct headers?
>
> [CODE]Subject: Meeting Booking
> From: My Name <[email protected]>
> Reply-To: My Name <[email protected]>
> MIME-Version: 1.0
> Content-Type: multipart/alternative;
>        boundary="----Meeting Booking----d3667a9b1f6cda067ce244c8102529b7"
> Content-Class: urn:content-classes:calendarmessage[/CODE]
>
> --
> View this message in context:
> http://www.nabble.com/Sending-iCal-using-Zend_Mail-tp25818865p25818865.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>
>

Reply via email to