### Navigation

- index
- modules
- toc
- next
- previous
- jmb.core 0.8.6 documentation »
- Misc: info ed utilità varie »

# Send a calendar event

There are many different types of calendar events, distinguished by the method:

PUBLISH: | when you just want to inform people of an event
REQUEST: | when you require a response

example:

    info = dict(
       location='My location',
       dtstart=datetime(2008, 6, 2, 15, 30),
       dtend=datetime(2008, 6, 2, 24, 00),
       organizer=('adentella@thundersystems.it', 'Sandro Dentella')
    )

    msg = EmailMessageCalendar(title, summary, from_email, recipient_list)
    event = msg.get_event(info)
    msg.set_attendee(event, email2, full_name) # Required for ``REQUEST``
    msg.attach_calendar(event, 'PUBLISH')
    msg.send()

class `jmb.core.utils.ics.``EmailMessageCalendar`(subject=u'', body=u'', from_email=None, to=None, bcc=None, connection=None, attachments=None, headers=None, cc=None)

  An EmailMessage capable of creating a correct Ics attachment

  Initialize a single email message (which can be sent to multiple recipients).

  All strings used to create the message can be unicode strings (or UTF-8 bytestrings). The SafeMIMEText class will handle any necessary encoding conversions.

  `attach_calendar`(events, meth='PUBLISH', calendar=None)

    Set a calendar

  `get_event`(props=None, meth='PUBLISH')

    Return a basic event to be added to a calendar event. `uuid` and `dtstamp` are added by default if not present. `attendee and `organizer` can be eather email or tuple (email, common_name) and will be correctly adde using `set_organizer()` and meth:set_attendee.

    Parameters: | props – a dict of properties to be added to the event. read rfc to get more info on usable params meth – the method of the calendar that will be created. Default: `PUBLISH`

  `set_attendee`(event, email, full_name=None)

    Set an attendee of the meeting. Required if method is `REQUEST`

    Parameters: | email – the email full_name – the full name

  `set_organizer`(event, email, full_name=None)

    Set the organizer of the meeting

    Parameters: | email – the email full_name – the full name

### Navigation

- index
- modules
- toc
- next
- previous
- jmb.core 0.8.6 documentation »
- Misc: info ed utilità varie »