Email

Implements \EmailInterface

Class representing the database entity of an email.

category

System

package

Email

subpackage

Entities

Methods

Class Constructor

__construct(\EmailContactInterface $sender = null, \EmailContactInterface $recipient = null, \EmailSubjectInterface $subject = null, \EmailContentInterface $contentHtml = null, \EmailContentInterface $contentPlain = null) 

All parameters are optional and can be set after the creation of the Email object. All class properties will have "null" as default value.

Arguments

$sender

\EmailContactInterface

(optional) E-Mail sender.

$recipient

\EmailContactInterface

(optional) E-Mail recipient.

$subject

\EmailSubjectInterface

(optional) E-Mail subject.

$contentHtml

\EmailContentInterface

(optional) E-Mail HTML content.

$contentPlain

\EmailContentInterface

(optional) E-Mail plain content.

Returns the attachments of an email.

getAttachments() : \AttachmentCollectionInterface

Response

\AttachmentCollectionInterface

E-Mail attachments.

Returns the BCC of an email.

getBcc() : \ContactCollectionInterface

Response

\ContactCollectionInterface

E-Mail BCC.

Returns the CC of an email.

getCc() : \ContactCollectionInterface

Response

\ContactCollectionInterface

E-Mail CC.

Returns the HTML content of an email.

getContentHtml() : \EmailContentInterface

Response

\EmailContentInterface

E-Mail HTML content.

Returns the plain content of an email.

getContentPlain() : \EmailContentInterface

Response

\EmailContentInterface

E-Mail plain content.

Returns the creation date of an email.

getCreationDate() : \DateTime

Response

\DateTime

E-Mail creation date.

Returns the ID of an email.

getId() : integer

Response

integer

E-Mail ID.

Returns the recipient of an email.

getRecipient() : \EmailContactInterface

Response

\EmailContactInterface

E-Mail recipient.

Returns the 'reply to' option value of an email.

getReplyTo() : \EmailContactInterface

Response

\EmailContactInterface

E-Mail reply-to.

Returns the sender of an email

getSender() : \EmailContactInterface

Response

\EmailContactInterface

E-Mail sender.

Returns the sent date of an email.

getSentDate() : \DateTime

Response

\DateTime

E-Mail sent date.

Returns the subject of an email.

getSubject() : \EmailSubjectInterface

Response

\EmailSubjectInterface

E-Mail subject.

Returns if an email is pending or sent.

isPending() : boolean

Response

boolean

E-Mail pending status.

Sets the attachments of an email.

setAttachments(\AttachmentCollectionInterface $attachments) 

Arguments

$attachments

\AttachmentCollectionInterface

E-Mail attachments.

Sets the BCC of an email.

setBcc(\ContactCollectionInterface $bcc) 

Arguments

$bcc

\ContactCollectionInterface

E-Mail BCC.

Sets the CC of an email.

setCc(\ContactCollectionInterface $cc) 

Arguments

Sets the HTML content of an email.

setContentHtml(\EmailContentInterface $contentHtml) 

Arguments

$contentHtml

\EmailContentInterface

E-Mail HTML content.

Sets the plain content of an email.

setContentPlain(\EmailContentInterface $contentPlain) 

Arguments

$contentPlain

\EmailContentInterface

E-Mail plain content.

Sets the creation date of an email.

setCreationDate(\DateTime $creationDate) 

Arguments

$creationDate

\DateTime

E-Mail creation date.

Sets the ID of an email.

setId(\IdType $id) 

Arguments

$id

\IdType

E-Mail ID.

Sets an email status to pending if true is given, else sent.

setPending(boolean $p_isPending) 
Throws
\InvalidArgumentException

If "$p_isPending" is not valid.

Arguments

$p_isPending

boolean

E-Mail pending status.

Sets the recipient of an email.

setRecipient(\EmailContactInterface $recipient) 

Arguments

$recipient

\EmailContactInterface

E-Mail recipient.

Sets the 'reply to' option value of an email.

setReplyTo(\EmailContactInterface $recipient) 

Arguments

$recipient

\EmailContactInterface

E-Mail reply-to.

Sets the sender of an email.

setSender(\EmailContactInterface $sender) 

Arguments

$sender

\EmailContactInterface

E-Mail sender.

Sets the sent date of an email.

setSentDate(\DateTime $sentDate) 

Arguments

$sentDate

\DateTime

E-Mail sent date.

Sets the subject of an email.

setSubject(\EmailSubjectInterface $subject) 

Arguments

$subject

\EmailSubjectInterface

E-Mail subject.

Properties

E-Mail ID.

id : integer
var

Type(s)

integer

E-Mail sender.

sender : \EmailContactInterface

E-Mail recipient.

recipient : \EmailContactInterface

E-Mail reply-to contact.

replyTo : \EmailContactInterface

E-Mail subject.

subject : \EmailSubjectInterface

E-Mail plain content

contentPlain : \EmailContentInterface

E-Mail HTML content.

contentHtml : \EmailContentInterface

E-Mail attachments.

attachments : \AttachmentCollectionInterface

E-Mail BCC.

bcc : \ContactCollectionInterface

E-Mail CC.

cc : \ContactCollectionInterface

Is E-Mail pending?

isPending : boolean
var

Type(s)

boolean

Create date time.

creationDate : \DateTime
var

Type(s)

\DateTime

Sent date time.

sentDate : \DateTime
var

Type(s)

\DateTime