Email Class Reference

Description

Renders an email.

Protected Member Functions

 _render ($email)
 Renders an email. More...
 
 _renderStub ($email)
 Renders an email stub. More...
 

Member Function Documentation

_render (   $email)
protected

Renders an email.

{
"id": 1,
"entityType": "Emails",
"zendesk": {
"id": 12345
"link": "https://example.zendesk.com/tickets/12345"
}
"sentTime": "2009-11-13T15:23:19-05:00",
"createdTime": "2009-11-15T16:23:19-05:00",
"to": [
{
"address": "foo@example.com",
"display": "Foo",
"entity": {
"entityName": "Contacts",
"id": "1"
}
},
{
"address": "foobaz@example.com",
"display": "Foo Baz",
"entity": {
"entityName": "Contacts",
"id": "2"
}
],
"from":[
{
"address": "bar@example.com",
"display": "Bar",
"entity": {
"entityName": "Users",
"id": "1"
}
}
],
"cc": [
{
"address": "baz@example.com",
"display": "Baz",
"entity": {
"entityName": "Accounts",
"id": "1"
}
}
],
"subject": "HELLO WORLD",
"body": "Dear Mr. Barclay,\n\nIn response to... [full email text]",
"accounts": [ Account, ... ],
"contacts": [ Contact, ... ],
"leads": [ Lead, ... ]
}

Conditional "accounts", "contacts" or "leads" stubs referencing associated entities this email is related to.

Returns
array
_renderStub (   $email)
protected

Renders an email stub.

{
"stub": true,
"id": 1,
"entityType": "Emails",
"zendesk": {
"id": 12345
"link": "https://example.zendesk.com/tickets/12345"
}
"sentTime": "2009-11-13T15:23:19-05:00",
"createdTime": "2009-11-15T16:23:19-05:00",
"to": [
{
"address": "foo@example.com",
"display": "Foo",
"entity": {
"entityName": "Contacts",
"id": "1"
}
},
{
"address": "foobaz@example.com",
"display": "Foo Baz",
"entity": {
"entityName": "Contacts",
"id": "2"
}
],
"from":[
{
"address": "bar@example.com",
"display": "Bar",
"entity": {
"entityName": "Users",
"id": "1"
}
}
],
"cc": [
{
"address": "baz@example.com",
"display": "Baz",
"entity": {
"entityName": "Accounts",
"id": "1"
}
}
],
"subject": "HELLO WORLD",
"bodyExcerpt": "Dear Mr. Barclay,\n\nIn response to..."
}
Returns
array