## Class YiiMailMessage

(line 36)

## Description

    CComponent
       |
       --YiiMailMessage

Located in File: /YiiMailMessage.php

##### Any requests to set or get attributes or call methods on this class that are not found in that class are redirected to the Swift_Mime_Message object.

This means you need to look at the Swift Mailer documentation to see what methods are availiable for this class. There are a lot of methods, more than I wish to document. Any methods availiable in Swift_Mime_Message are availiable here.

Documentation for the most important methods can be found at http://swiftmailer.org/docs/messages

The YiiMailMessage component also allows using a shorthand for methods in Swift_Mime_Message that start with set* or get* For instance, instead of calling $message->setFrom('...') you can use $message->from = '...'.

Here are a few methods to get you started:

- setSubject('Your subject')
- setFrom(array('john@doe.com' => 'John Doe'))
- setTo(array('receiver@domain.org', 'other@domain.org' => 'Name'))
- attach(Swift_Attachment::fromPath('my-document.pdf'))

## Class Variables

Summary:
Swift_Mime_Message $message
string $view

#### $message (line 48)

#### Data type : Swift_Mime_Message

- access: - public

#### $view (line 43)

#### Data type : string

- var: - the view to use for rendering the body, null if no view is used. An extra variable $mail will be passed to the view .which you may use to set e.g. the email subject from within the view
- access: - public

## Class Constants

Summary:

## Method Detail

Summary:
Swift_Mime_Message __construct ([string $subject = null], [string $body = null], [string $contentType = null], [string $charset = null])
void setBody ([mixed $body = ''], [string $contentType = null], [string $charset = null])
void __call (string $name, $parameters)
void __get (string $name)
void __set (string $name, $value)

#### Constructor __construct (line 111)

#### Swift_Mime_Message __construct( [string $subject = null], [string $body = null], [string $contentType = null], [string $charset = null])

##### You may optionally set some message info using the paramaters of this constructor.

Use view and setBody() for more control.

#### Parameters

- string $subject:
- string $body:
- string $contentType:
- string $charset:

#### Info

- access - public

#### Method setBody (line 128)

#### void setBody( [mixed $body = ''], [string $contentType = null], [string $charset = null])

##### Set the body of this entity, either as a string, or array of view variables if a view is set, or as an instance of Swift_OutputByteStream.

#### Parameters

- mixed $body: the body of the message. If a $this->view is set and this is a string, this is passed to the view as $body. If $this->view is set and this is an array, the array values are passed to the view like in the controller render() method
- string $contentType: content type optional. For html, set to 'html/text'
- string $charset: charset optional

#### Info

- access - public

#### Method __call (line 89)

#### void __call( string $name, $parameters)

##### Any requests to set or get attributes or call methods on this class that are not found are redirected to the Swift_Mime_Message object.

#### Parameters

- string $name: the method name
- $parameters:

#### Info

- access - public

#### Method __get (line 55)

#### void __get( string $name)

##### Any requests to set or get attributes or call methods on this class that are not found are redirected to the Swift_Mime_Message object.

#### Parameters

- string $name: the attribute name

#### Info

- access - public

#### Method __set (line 72)

#### void __set( string $name, $value)

##### Any requests to set or get attributes or call methods on this class that are not found are redirected to the Swift_Mime_Message object.

#### Parameters

- string $name: the attribute name
- $value:

#### Info

- access - public

## Inherited Variables

### Inherited Class Variable Summary

## Inherited Methods

### Inherited Method Summary

Documentation generated on Fri, 12 Nov 2010 20:45:32 +0000 by phpDocumentor 1.4.3