Class Email

Class representing the database entity of an email.

Email implements EmailInterface
Package: Email\Entities
Category: System
Located at Services/System/Email/Entities/Email.inc.php

Methods summary

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

Class Constructor

public setId( IdType $id )

Sets the ID of an email.

public getId( void ) : integer

Returns the ID of an email.

public setSender( EmailContactInterface $sender )

Sets the sender of an email.

public getSender( void ) : EmailContactInterface

Returns the sender of an email

public setRecipient( EmailContactInterface $recipient )

Sets the recipient of an email.

public getRecipient( void ) : EmailContactInterface

Returns the recipient of an email.

public setReplyTo( EmailContactInterface $recipient )

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

public getReplyTo( void ) : EmailContactInterface

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

public setSubject( EmailSubjectInterface $subject )

Sets the subject of an email.

public getSubject( void ) : EmailSubjectInterface

Returns the subject of an email.

public setContentPlain( EmailContentInterface $contentPlain )

Sets the plain content of an email.

public getContentPlain( void ) : EmailContentInterface

Returns the plain content of an email.

public setContentHtml( EmailContentInterface $contentHtml )

Sets the HTML content of an email.

public getContentHtml( void ) : EmailContentInterface

Returns the HTML content of an email.

public setAttachments( AttachmentCollectionInterface $attachments )

Sets the attachments of an email.

public getAttachments( void ) : AttachmentCollectionInterface

Returns the attachments of an email.

public setBcc( ContactCollectionInterface $bcc )

Sets the BCC of an email.

public getBcc( void ) : ContactCollectionInterface

Returns the BCC of an email.

public setCc( ContactCollectionInterface $cc )

Sets the CC of an email.

public getCc( void ) : ContactCollectionInterface

Returns the CC of an email.

public setPending( boolean $p_isPending )

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

public isPending( void ) : boolean

Returns if an email is pending or sent.

public setCreationDate( DateTime $creationDate )

Sets the creation date of an email.

public getCreationDate( void ) : DateTime

Returns the creation date of an email.

public setSentDate( DateTime $sentDate )

Sets the sent date of an email.

public getSentDate( void ) : DateTime

Returns the sent date of an email.

Properties summary

protected $id : integer

E-Mail ID.


		
protected $sender : EmailContactInterface

E-Mail sender.


		
protected $recipient : EmailContactInterface

E-Mail recipient.


		
protected $replyTo : EmailContactInterface

E-Mail reply-to contact.


		
protected $subject : EmailSubjectInterface

E-Mail subject.


		
protected $contentPlain : EmailContentInterface

E-Mail plain content


		
protected $contentHtml : EmailContentInterface

E-Mail HTML content.


		
protected $attachments : AttachmentCollectionInterface

E-Mail attachments.


		
protected $bcc : ContactCollectionInterface

E-Mail BCC.


		
protected $cc : ContactCollectionInterface

E-Mail CC.


		
protected $isPending : boolean

Is E-Mail pending?


		
protected $creationDate : DateTime

Create date time.


		
protected $sentDate : DateTime

Sent date time.