Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Content-Class Header?' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Content-Class Header?
Authored by: lx on Jan 29, '03 11:03:46AM
If there are no distinguishing headers (be sure to use View->Show All Headers) with which to identify messages containing vCalendars and there are no distinguishing strings of text in the message subject or message content (the part that is not in the attachment), then you can try being aggressive about finding them and running the AppleScript on all your messages, all messages from people in your AddressBook, all messages with attachments (try adding the header rule "Content-Type" "contains" "multipart"), or some other similarly broad mail rule.

The script does nothing with messages that do not contain BEGIN:VCALENDAR and END:VCALENDAR. Using a more general rule, however, might cause the script to extract invlaid vCalendars as well (such as ones quoted in replies), so some caution is in order for such an approach.

An additional note about applying this hint to your own context. While Mail.app interprets the invitations I receive as part of the message content, it may not do that with the invitations you are receiving for which it may be including the vCalendar as an attachment of unknown type. If this is the case, you will need to change the line set thisContent to content of thisMessage to set thisContent to source of thisMessage in order for the script to extract the vCalendar.

[ Reply to This | # ]