Posted by shanefjordan on January 6, 2012 at 3:49pm
2 followers
Jump to:
| Project: | Mime Mail |
| Version: | 6.x-1.0 |
| Component: | User interface |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
I would like to use the module with the Rules module to send a meeting request. How would I need to format the information to send this when the rule is triggered? I can use the send mail to arbitrary mail address, but do not know how to format the message. I have dates/times, location, description information.
Thank you,
Shane
Comments
#1
I tried using the following code to build the attachment as content, but it does not send anything. I only receive the e-mail message, no attachment.
<?php
$msg_text .= "BEGIN:VCALENDAR";
$msg_text .= "PRODID:-//Microsoft Corporation//Outlook 11.0 MIMEDIR//EN";
$msg_text .= "VERSION:2.0";
$msg_text .= "METHOD:REQUEST";
$msg_text .= "BEGIN:VEVENT";
$msg_text .= "ORGANIZER:MAILTO:calendar@fairmontstate.edu";
$msg_text .= "DTSTART:20120118T170000Z";
$msg_text .= "DTEND:20120119T035959Z";
$msg_text .= "UID:12929kalsjflasjkdf912929292";
$msg_text .= "LOCATION:my meeting location";
$msg_text .= "TRANSP:OPAQUE";
$msg_text .= "SEQUENCE:0";
$msg_text .= "DTSTAMP:20120112T045649Z";
$msg_text .= "CATEGORIES:Meeting";
$msg_text .= "DESCRIPTION:meeting description, line 1 of 2.\nline 2 of 2.\n\n";
$msg_text .= "SUMMARY:meeting subject";
$msg_text .= "PRIORITY:5";
$msg_text .= "X-MICROSOFT-CDO-IMPORTANCE:1";
$msg_text .= "CLASS:PUBLIC";
$msg_text .= "BEGIN:VALARM";
$msg_text .= "TRIGGER:-ET5M";
$msg_text .= "ACTION:DISPLAY";
$msg_text .= "DESCRIPTION:Reminder";
$msg_text .= "END:VALARM";
$msg_text .= "BEGIN:VTIMEZONE";
$msg_text .= "TZID:US/Eastern";
$msg_text .= "END:VTIMEZONE";
$msg_text .= "END:VEVENT";
$msg_text .= "END:VCALENDAR";
$attachments = array( array(
'filecontent' => $msg_text,
'filename' => 'calendarrequest.ics',
'filemime' => 'text/calendar'
));
?>
#2
You can't specify attachments by content via the Rules UI.
#3
Is there any other way to accomplish this?
What I am trying to do:
I have a calendar system. When someone creates an event, they have an option to request a photographer. If they request the photographer, I want to send the photographer an e-mail with an ical attachment that will allow the photographer to easily accept the event and have it added to their calendar.
Thank you,
Shane