Object | --Persistent | --Component | --ZMail
Located in File: /Zend/zmail.inc.php
Use this component if you need to send e-mail in your application. This Zend Framework based component allows you to decide the transport (SMTP, Sendmail, etc) and provide properties to let you set the target of the e-mails, the Cc, the Bcc, etc. Is also able to send e-mail in HTML and include attachments.
![]() | Attachments | This property specifies the attachments you want to add to the e-mail |
![]() | Bcc | This property specifies the hidden copies of the e-mail |
![]() | BodyHTML | Use this property to specify the body of the e-mail in HTML format |
![]() | BodyText | Use this property to specify the body of the e-mail in plain-text format. |
![]() | Cc | This property specifies the copies of the e-mail |
![]() | FromEmail | It allows you to select the email of the sender |
![]() | FromName | It allows you to select the name of the sender of the e-mail |
![]() | Headers | If you need to add your custom headers to the message, use this property |
![]() | Subject | Specifies the subject of the e-mail to be sent |
![]() | To | This property specifies the targets of the e-mail |
![]() | Transport | Use this property to specify the transport to use to send the e-mail |
Defined in class Component |
||
![]() | Name | Specifies the name for the component. The name is used as an identifier and should be unique. |
![]() | Tag | A versatile property of every Component that can be used in any way you want |
![]() | ComponentCount | Indicates the number of components owned by the component. |
![]() | Components | Lists all the components owned by this component. |
![]() | ControlState | A flag to know the state of the control, csLoading, csDesigning |
![]() | DataFieldValue | This property returns the value of the datafield if any. |
![]() | NamePath | Specifies the path to uniquely identify a component, qualified by the owner when required. |
![]() | Owner | Indicates the component that is responsible for streaming and freeing this component. |
Defined in class Persistent |
||
![]() | NamePath | Used to serialize/unserialize. It returns the full path to identify this component. |
![]() | Owner | Owner of the component. |
property Attachments (line 243)
This is an array property to allow you specify the attachments you want to add to the e-mail
The array has a form of:
At design-time, you can use the property editor to make up this array.
By default, the attachments are interpreted as paths to the files you want to attach, but if you want to customize the attachments to include other information, or to customize the way attachments are handled, use the OnCustomizeAttachment, which let's you select the content, mimetype, disposition and filename for an attachment.
property Bcc (line 213)
This is an array property to allow you specify the extra hidden recipients of the e-mail you want to send.
The array has a form of:
At design-time, you can use the property editor to make up this array.
property BodyHTML (line 69)
You can use it in combination with BodyText to send a multipart e-mail in which the contents can be selected to be shown in plain-text or in HTML.
property BodyText (line 55)
This property is a string property you can use to set the contents of the e-mail in plain-text format.
property Cc (line 188)
This is an array property to allow you specify the extra recipients of the e-mail you want to send.
The array has a form of:
At design-time, you can use the property editor to make up this array.
property FromEmail (line 114)
Use it in combination with FromName to add e-mail of the sender
i.e. John Doe <john.doe@unknown.com>
John Doe is the FromName property, while john.doe@unknown.com is FromEmail
property FromName (line 97)
Use it in combination with FromEmail to add the real name of the sender
i.e. John Doe <john.doe@unknown.com>
John Doe is the FromName property, while john.doe@unknown.com is FromEmail
property Headers (line 319)
This property allows you to add your own headers to the mail message, it's an array property in the form:
You can use the same header name several times, so the values will be added
property To (line 163)
This is an array property to allow you specify the recipients of the e-mail you want to send.
The array has a form of:
At design-time, you can use the property editor to make up this array.
property Transport (line 132)
By default, the sendmail method is used, is basically like using the PHP mail() function, this method is used if no transport is attached.
But you can also customize the process by using some ZMailTransport class, like ZMailTransportSMTP or ZMailTransportSendmail. Those components also have properties can be modified to customize the sending process.
property Name
property Tag
property ComponentCount
property Components
property ControlState
property DataFieldValue
property NamePath
property Owner
property NamePath
| loaded | Initializes the component after the form file has been read into memory. [Overrides Component::loaded()] |
| send | Sends the e-mail |
Defined in class Component |
||
![]() | dumpChildrenJavascript | Dumps the javascript code for all the children |
![]() | dumpFormItems | Dumps code just after the form tag, useful to dump hidden fields for state retrieving for non visible components |
![]() | dumpHeaderCode | Dumps header code required |
![]() | dumpJavascript | Dumps the javascript code needed by this component |
![]() | hasValidDataField | Returns true if a valid data field is attached to the component |
![]() | init | Initializes a component |
![]() | loaded | Initializes the component after the form file has been read into memory. |
![]() | loadedChildren | Calls childrens loaded |
![]() | preinit | Method called before init() |
![]() | serializeChildren | Serializes all children |
![]() | unserializeChildren | Unserializes all children by calling unserialize for all the components |
Defined in class Persistent |
||
![]() | serialize | Stores this object into the session. |
![]() | unserialize | This method uses PHP reflection to iterate through published properties (the ones starting with get) and retrieve the properties stored by a previous serialize() call. |
Defined in class Object |
||
![]() | __construct | Constructs an object and initializes its data before the object is first used. |
![]() | className | Returns a string indicating the type of the object instance (as opposed to the type of the variable passed as an argument). |
![]() | classParent | Returns the type of the immediate ancestor of a class. |
Method loaded (line 136)
Overrides : Component::loaded() Initializes the component after the form file has been read into memory.
Method send (line 329)
Use this method once all the properties and attachments are set. This method also fires the OnCustomizeAttachment when is adding attachments to the e-mail.
![]() | OnCustomizeAttachment | This event allows you to customize how attachments are handled. |
property OnCustomizeAttachment (line 296)
Use this event if you want to change the way attachments are handled, this event is fired just before add the attachment to the e-mail, and you get in $params the information of the attachment. Index key and name you set on the Attachments property.
To modify the way to handle an specific attachment, return an array with the new information.
The $params property has this form:
You have to return an array which can have the following values:
If some of the values are not present, the default value will be used.