EmailFactoryInterface

Extends

Interface EmailFactoryInterface

category

System

package

Email

subpackage

Interfaces

Methods

Creates an email attachment object

createAttachment(\AttachmentPathInterface $path, \AttachmentNameInterface $name = null) : \EmailAttachment

Arguments

$path

\AttachmentPathInterface

Valid path of the attachment (on the server).

$name

\AttachmentNameInterface

(optional) Display name for the attachment.

Response

\EmailAttachment

The created email attachment.

Creates an attachments handler object

createAttachmentsHandler(string $p_uploadsDirPath = null) : \AttachmentsHandler

Arguments

$p_uploadsDirPath

string

(optional) You can specify a custom uploads directory path if you do not want the default "uploads" directory. The path must contain a "tmp" and an "attachments" directory otherwise the AttachmentsHandler class will not work properly.

Response

\AttachmentsHandler

The created attachments handler.

Creates an email contact object

createContact(\EmailAddressInterface $emailAddress, \ContactTypeInterface $contactType, \ContactNameInterface $contactName = null) : \EmailContact

Arguments

$emailAddress

\EmailAddressInterface

Email address of the contact.

$contactType

\ContactTypeInterface

Contact type (see ContactType class definition).

$contactName

\ContactNameInterface

(optional) Contact display name.

Response

\EmailContact

The created email contact.

Creates email deleter object

createDeleter() : \EmailDeleter

Response

\EmailDeleter

The created email deleter.

Creates an email object

createEmail(\IdType $id = null, \EmailSubjectInterface $subject = null, \EmailContentInterface $contentHtml = null, \EmailContentInterface $contentPlain = null, boolean $p_isPending = true, \ContactCollectionInterface $contacts = null, \AttachmentCollectionInterface $attachments = null) : \Email

Arguments

$id

\IdType

(optional) E-Mail ID.

$subject

\EmailSubjectInterface

(optional) E-Mail subject.

$contentHtml

\EmailContentInterface

(optional) E-Mail HTML content.

$contentPlain

\EmailContentInterface

(optional) E-Mail plain content.

$p_isPending

boolean

(optional) E-Mail is pending?

$contacts

\ContactCollectionInterface

(optional) E-Mail contacts.

$attachments

\AttachmentCollectionInterface

(optional) E-Mail attachments.

Response

\Email

The created email.

Creates a PHP mailer object.

createMailer(string $protocol = null, \EmailMailerSettings|null $mailerSettings = null) : \PHPMailer\PHPMailer\PHPMailer

Arguments

$protocol

string

(Optional) Provide 'smtp', 'sendmail' or 'mail' if you want to override the EMAIL_TRANSPORT constant.

$mailerSettings

\EmailMailerSettings|null

(Optional) settings value object for mailer.

Response

\PHPMailer\PHPMailer\PHPMailer

The created PHP mailer.

Creates a mailer adapter object

createMailerAdapter() : \MailerAdapter

Response

\MailerAdapter

The created mailer adapter.

Create EmailReader Object

createReader() : \EmailReader

Response

\EmailReader

The created email deleter.

Creates an email repository object

createRepository() : \EmailRepository

Response

\EmailRepository

The created email repository.

Creates an email service object

createService() : \EmailService

Response

\EmailService

The created email service.

Creates an email writer object

createWriter() : \EmailWriter

Response

\EmailWriter

The created email writer.