class EmailService implements EmailServiceInterface

Main services related to Email

Properties

private ConfigServiceInterface $configService Stores ConfigServiceInterface
private EntityManagerInterface $em Stores EntityManagerInterface
private Email $email Stores Email Entity
private MailerInterface $mailer Stores mailer
private Swift_Message $message Stores message

Methods

__construct(ConfigServiceInterface $configService, EntityManagerInterface $em, MailerInterface $mailer)

No description

create(array $emailData)

Creates email object

array
getEmails()

Gets the emails

mixed
getParameter(string $parameter)

Returns the value of parameter

persist(bool $saveDatabase)

Persists Email in DB

bool
send(array $emailData, bool $saveDatabase = false)

Creates and sends the email

bool
validate(array $emailData)

Validates email addresses and creates message

Details

at line 60
__construct(ConfigServiceInterface $configService, EntityManagerInterface $em, MailerInterface $mailer)

Parameters

ConfigServiceInterface $configService
EntityManagerInterface $em
MailerInterface $mailer

at line 74
create(array $emailData)

Creates email object

Parameters

array $emailData

at line 86
array getEmails()

Gets the emails

Return Value

array

at line 97
mixed getParameter(string $parameter)

Returns the value of parameter

Parameters

string $parameter

Return Value

mixed

Exceptions

LogicException

at line 105
persist(bool $saveDatabase)

Persists Email in DB

Parameters

bool $saveDatabase

at line 116
bool send(array $emailData, bool $saveDatabase = false)

Creates and sends the email

Parameters

array $emailData
bool $saveDatabase

Return Value

bool

at line 146
bool validate(array $emailData)

Validates email addresses and creates message

Parameters

array $emailData

Return Value

bool