Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

Commit

Permalink
Fixed README errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
cosimomeli authored Sep 9, 2016
1 parent ed5c9ce commit ffd464e
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,29 +48,29 @@ More information about iCalendar specifications here: http://www.kanzaki.com/doc

Just be sure to set the METHOD field as PUBLISH or REQUEST, and set at least the recipient of the email as ATTENDEE.

#### 2. Create the Swift_Calendar object
#### 2. Create the Swift_Calendar object

```PHP
$attachment = new Swift_Calendar($iCalString, Swift_Calendar::METHOD_REQUEST);
```

The method must be the same as the one you set in the iCal.

### 3. Attach it to the message
#### 3. Attach it to the message

```PHP
$swiftMessage->attach($attachment);
```

You can add more different MIME parts to the message. I tested it with text/plan + text/html and with a normal attachment too.

### 4. Send it
#### 4. Send it

```PHP
$mailer->send($swiftMessage);
```

##Notes
##Notes

Mail clients handle the embedded calendar in different ways.
Here are some of my personal experiences:
Expand All @@ -79,6 +79,5 @@ Just be sure to set the METHOD field as PUBLISH or REQUEST, and set at least the

* **Gmail**: Uses the fields DESCRIPTION and SUMMARY as description and title of the event (just as it should be)

##

Feel free to ask any question and to give any suggestion for improvements.

Feel free to ask any question and to give any suggestion for improvements.

0 comments on commit ffd464e

Please sign in to comment.