Skip to content

Commit

Permalink
Merge pull request sulu#16 from alexander-schranz/develop
Browse files Browse the repository at this point in the history
release: 0.2.1
  • Loading branch information
alexander-schranz committed Dec 17, 2015
2 parents 950e78c + d7a26be commit cae1795
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Form/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ public function __construct(
$this->mailHelper = $mailHelper;
$this->entityManager = $entityManager;
$this->csrfTokenManager = $csrfTokenManager;
$this->mailHelper = $mailHelper;
$this->templating = $templating;
$this->eventDispatcher = $eventDispatcher;
$this->mediaManager = $mediaManager;
Expand Down Expand Up @@ -175,21 +174,21 @@ protected function sendMails(
) {
$notifyMailTemplatePath = $type->getNotifyMail($form->getData());
$customerMailTemplatePath = $type->getCustomerMail($form->getData());

if ($notifyMailTemplatePath) {
$notifyMail = $this->templating->render($notifyMailTemplatePath, $attributes);

$this->mailHelper->sendMail(
$type->getNotifySubject($form->getData()),
$notifyMail,
$type->getNotifyToMailAddress($form->getData()),
$type->getNotifyFromMailAddress($form->getData())
);
}

if ($customerMailTemplatePath) {
$customerMail = $this->templating->render($customerMailTemplatePath, $attributes);

$this->mailHelper->sendMail(
$type->getCustomerSubject($form->getData()),
$customerMail,
Expand Down

0 comments on commit cae1795

Please sign in to comment.