-
Notifications
You must be signed in to change notification settings - Fork 506
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hack email data provider to just try to send things regardless of set…
…tings
- Loading branch information
Showing
1 changed file
with
10 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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(); | ||
|
||
|
@@ -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 | ||
|