Interface EmailServiceInterface

Interface EmailServiceInterface

Direct known implementers

EmailService

Methods summary

public create( EmailContactInterface $sender, EmailContactInterface $recipient, EmailSubjectInterface $subject, EmailContentInterface $content = null ) : EmailInterface

Creates a new email

public send( EmailInterface $email )

Sends and saves an email.

public queue( EmailInterface $email )

Saves an email as pending (will not be sent).

public write( EmailInterface $email )

Writes an email instance to the DB.

public getById( IdType $id ) : EmailInterface

Returns an email by id.

public findById( IdType $id ) : EmailInterface|null

Finds an email by ID.

public delete( EmailInterface $email )

Removes an email from the database.

public filter( string $p_keyword, array $limit = array(), array $order = array() ) : EmailCollection

Filters email records with provided keyword string.

public validateEmailAddress( string $p_emailAddress ) : boolean

Validate a string email address.

public sendPending( void )

Sends pending email records.

public getPending( void ) : EmailCollectionInterface

Return pending email records as an email collection.

public getSent( void ) : EmailCollectionInterface

Returns sent email records as an email collection.

public getAll( void ) : EmailCollection

Returns all email records from the database.

public sendCollection( EmailCollectionInterface $collection )

Sends a collection of emails.

public queueCollection( EmailCollectionInterface $collection )

Queues a collection of emails.

public writeCollection( EmailCollectionInterface $collection )

Writes a collection of emails into database.

public deleteCollection( EmailCollectionInterface $collection )

Deletes a collection of emails.

public getRecordCount( string $p_filterKeyword = '' ) : integer

Returns the current count of the email records in the database.

public deleteEmailsByCustomerEmail( CustomerEmail $email )

Removes all emails from the data base that have the given email address as sender or recipient.

public getEmailsByCustomerEmail( CustomerEmail $email ) : EmailCollection

Gets all emails from the data base that have the given email address as sender or recipient.