Email
in package
implements
EmailInterface
Class representing the database entity of an email.
Tags
Interfaces, Classes and Traits
- EmailInterface
- Interface EmailInterface
Table of Contents
- $attachments : AttachmentCollectionInterface
- E-Mail attachments.
- $bcc : ContactCollectionInterface
- E-Mail BCC.
- $cc : ContactCollectionInterface
- E-Mail CC.
- $contentHtml : EmailContentInterface
- E-Mail HTML content.
- $contentPlain : EmailContentInterface
- E-Mail plain content
- $creationDate : DateTime
- Create date time.
- $id : int
- E-Mail ID.
- $isPending : bool
- Is E-Mail pending?
- $recipient : EmailContactInterface
- E-Mail recipient.
- $replyTo : EmailContactInterface
- E-Mail reply-to contact.
- $sender : EmailContactInterface
- E-Mail sender.
- $sentDate : DateTime
- Sent date time.
- $subject : EmailSubjectInterface
- E-Mail subject.
- __construct() : mixed
- Class Constructor
- getAttachments() : AttachmentCollectionInterface
- Returns the attachments of an email.
- getBcc() : ContactCollectionInterface
- Returns the BCC of an email.
- getCc() : ContactCollectionInterface
- Returns the CC of an email.
- getContentHtml() : EmailContentInterface
- Returns the HTML content of an email.
- getContentPlain() : EmailContentInterface
- Returns the plain content of an email.
- getCreationDate() : DateTime
- Returns the creation date of an email.
- getId() : int
- Returns the ID of an email.
- getRecipient() : EmailContactInterface
- Returns the recipient of an email.
- getReplyTo() : EmailContactInterface
- Returns the 'reply to' option value of an email.
- getSender() : EmailContactInterface
- Returns the sender of an email
- getSentDate() : DateTime
- Returns the sent date of an email.
- getSubject() : EmailSubjectInterface
- Returns the subject of an email.
- isPending() : bool
- Returns if an email is pending or sent.
- setAttachments() : mixed
- Sets the attachments of an email.
- setBcc() : mixed
- Sets the BCC of an email.
- setCc() : mixed
- Sets the CC of an email.
- setContentHtml() : mixed
- Sets the HTML content of an email.
- setContentPlain() : mixed
- Sets the plain content of an email.
- setCreationDate() : mixed
- Sets the creation date of an email.
- setId() : mixed
- Sets the ID of an email.
- setPending() : mixed
- Sets an email status to pending if true is given, else sent.
- setRecipient() : mixed
- Sets the recipient of an email.
- setReplyTo() : mixed
- Sets the 'reply to' option value of an email.
- setSender() : mixed
- Sets the sender of an email.
- setSentDate() : mixed
- Sets the sent date of an email.
- setSubject() : mixed
- Sets the subject of an email.
Properties
$attachments
E-Mail attachments.
protected
AttachmentCollectionInterface
$attachments
$bcc
E-Mail BCC.
protected
ContactCollectionInterface
$bcc
$cc
E-Mail CC.
protected
ContactCollectionInterface
$cc
$contentHtml
E-Mail HTML content.
protected
EmailContentInterface
$contentHtml
$contentPlain
E-Mail plain content
protected
EmailContentInterface
$contentPlain
$creationDate
Create date time.
protected
DateTime
$creationDate
$id
E-Mail ID.
protected
int
$id
$isPending
Is E-Mail pending?
protected
bool
$isPending
$recipient
E-Mail recipient.
protected
EmailContactInterface
$recipient
$replyTo
E-Mail reply-to contact.
protected
EmailContactInterface
$replyTo
$sender
E-Mail sender.
protected
EmailContactInterface
$sender
$sentDate
Sent date time.
protected
DateTime
$sentDate
$subject
E-Mail subject.
protected
EmailSubjectInterface
$subject
Methods
__construct()
Class Constructor
public
__construct([EmailContactInterface $sender = null ][, EmailContactInterface $recipient = null ][, EmailSubjectInterface $subject = null ][, EmailContentInterface $contentHtml = null ][, EmailContentInterface $contentPlain = null ]) : mixed
All parameters are optional and can be set after the creation of the Email object. All class properties will have "null" as default value.
Parameters
- $sender : EmailContactInterface = null
-
(optional) E-Mail sender.
- $recipient : EmailContactInterface = null
-
(optional) E-Mail recipient.
- $subject : EmailSubjectInterface = null
-
(optional) E-Mail subject.
- $contentHtml : EmailContentInterface = null
-
(optional) E-Mail HTML content.
- $contentPlain : EmailContentInterface = null
-
(optional) E-Mail plain content.
Return values
mixed —getAttachments()
Returns the attachments of an email.
public
getAttachments() : AttachmentCollectionInterface
Return values
AttachmentCollectionInterface —E-Mail attachments.
getBcc()
Returns the BCC of an email.
public
getBcc() : ContactCollectionInterface
Return values
ContactCollectionInterface —E-Mail BCC.
getCc()
Returns the CC of an email.
public
getCc() : ContactCollectionInterface
Return values
ContactCollectionInterface —E-Mail CC.
getContentHtml()
Returns the HTML content of an email.
public
getContentHtml() : EmailContentInterface
Return values
EmailContentInterface —E-Mail HTML content.
getContentPlain()
Returns the plain content of an email.
public
getContentPlain() : EmailContentInterface
Return values
EmailContentInterface —E-Mail plain content.
getCreationDate()
Returns the creation date of an email.
public
getCreationDate() : DateTime
Return values
DateTime —E-Mail creation date.
getId()
Returns the ID of an email.
public
getId() : int
Return values
int —E-Mail ID.
getRecipient()
Returns the recipient of an email.
public
getRecipient() : EmailContactInterface
Return values
EmailContactInterface —E-Mail recipient.
getReplyTo()
Returns the 'reply to' option value of an email.
public
getReplyTo() : EmailContactInterface
Return values
EmailContactInterface —E-Mail reply-to.
getSender()
Returns the sender of an email
public
getSender() : EmailContactInterface
Return values
EmailContactInterface —E-Mail sender.
getSentDate()
Returns the sent date of an email.
public
getSentDate() : DateTime
Return values
DateTime —E-Mail sent date.
getSubject()
Returns the subject of an email.
public
getSubject() : EmailSubjectInterface
Return values
EmailSubjectInterface —E-Mail subject.
isPending()
Returns if an email is pending or sent.
public
isPending() : bool
Return values
bool —E-Mail pending status.
setAttachments()
Sets the attachments of an email.
public
setAttachments(AttachmentCollectionInterface $attachments) : mixed
Parameters
- $attachments : AttachmentCollectionInterface
-
E-Mail attachments.
Return values
mixed —setBcc()
Sets the BCC of an email.
public
setBcc(ContactCollectionInterface $bcc) : mixed
Parameters
- $bcc : ContactCollectionInterface
-
E-Mail BCC.
Return values
mixed —setCc()
Sets the CC of an email.
public
setCc(ContactCollectionInterface $cc) : mixed
Parameters
- $cc : ContactCollectionInterface
-
E-Mail CC.
Return values
mixed —setContentHtml()
Sets the HTML content of an email.
public
setContentHtml(EmailContentInterface $contentHtml) : mixed
Parameters
- $contentHtml : EmailContentInterface
-
E-Mail HTML content.
Return values
mixed —setContentPlain()
Sets the plain content of an email.
public
setContentPlain(EmailContentInterface $contentPlain) : mixed
Parameters
- $contentPlain : EmailContentInterface
-
E-Mail plain content.
Return values
mixed —setCreationDate()
Sets the creation date of an email.
public
setCreationDate(DateTime $creationDate) : mixed
Parameters
- $creationDate : DateTime
-
E-Mail creation date.
Return values
mixed —setId()
Sets the ID of an email.
public
setId(IdType $id) : mixed
Parameters
- $id : IdType
-
E-Mail ID.
Return values
mixed —setPending()
Sets an email status to pending if true is given, else sent.
public
setPending(bool $p_isPending) : mixed
Parameters
- $p_isPending : bool
-
E-Mail pending status.
Tags
Return values
mixed —setRecipient()
Sets the recipient of an email.
public
setRecipient(EmailContactInterface $recipient) : mixed
Parameters
- $recipient : EmailContactInterface
-
E-Mail recipient.
Return values
mixed —setReplyTo()
Sets the 'reply to' option value of an email.
public
setReplyTo(EmailContactInterface $recipient) : mixed
Parameters
- $recipient : EmailContactInterface
-
E-Mail reply-to.
Return values
mixed —setSender()
Sets the sender of an email.
public
setSender(EmailContactInterface $sender) : mixed
Parameters
- $sender : EmailContactInterface
-
E-Mail sender.
Return values
mixed —setSentDate()
Sets the sent date of an email.
public
setSentDate(DateTime $sentDate) : mixed
Parameters
- $sentDate : DateTime
-
E-Mail sent date.
Return values
mixed —setSubject()
Sets the subject of an email.
public
setSubject(EmailSubjectInterface $subject) : mixed
Parameters
- $subject : EmailSubjectInterface
-
E-Mail subject.