Skip to content

Commit

Permalink
Migrated to composer install
Browse files Browse the repository at this point in the history
  • Loading branch information
makville committed Jan 4, 2020
1 parent 74195bb commit 59c67c4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Controller/MailsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,9 @@ public function compose($id = null) {
$data['status'] = 'sent';
$status = 'sent';
//do the actual sending
$this->Mailgun->sendWithAttachments(\Cake\Core\Configure::read('makville-mailer-admin-mail', 'admin@' . $this->request->host()), $recipients, $data['name'], $data['content'], $attachments);
if (in_array('Mailgun', $this->components()->loaded())) {
$this->Mailgun->sendWithAttachments(\Cake\Core\Configure::read('makville-mailer-admin-mail', 'admin@' . $this->request->host()), $recipients, $data['name'], $data['content'], $attachments);
}
} else {
$data['status'] = 'draft';
$status = 'draft';
Expand Down

0 comments on commit 59c67c4

Please sign in to comment.