Skip to content

Commit

Permalink
Hack email data provider to just try to send things regardless of set…
Browse files Browse the repository at this point in the history
…tings
  • Loading branch information
rjmackay committed Jun 14, 2016
1 parent 8ab2364 commit 7beef75
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions plugins/data-provider-email/classes/DataProvider/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ class DataProvider_Email extends DataProvider {
*/
public function send($to, $message, $title = "")
{

if (!$this->_is_provider_available()) {
Kohana::$log->add(Log::ERROR, 'The email data source is not currently available. It can be accessed by upgrading to a higher Ushahidi tier.');
return array(Message_Status::FAILED, FALSE);
}
// Always try to send emails!
// if (!$this->_is_provider_available()) {
// Kohana::$log->add(Log::ERROR, 'The email data source is not currently available. It can be accessed by upgrading to a higher Ushahidi tier.');
// return array(Message_Status::FAILED, FALSE);
// }

$provider_options = $this->options();

Expand Down Expand Up @@ -56,6 +56,11 @@ public function send($to, $message, $title = "")
$body->site_url = rtrim(URL::site(), '/');

$from = $this->from();

if (!$from) {
$from = Kohana::$config->load('site.email') ?: '[email protected]';
}

$from_name = ! empty($provider_options['from_name']) ? $provider_options['from_name'] : $from;

try
Expand Down

0 comments on commit 7beef75

Please sign in to comment.