Skip to content

Commit

Permalink
Inbound: Set default provider to SendGrid.
Browse files Browse the repository at this point in the history
It's either SendGrid or Postmark, since these two options are easier to
set up and are free.

See #77.
  • Loading branch information
r-a-y committed Oct 3, 2016
1 parent f7831e8 commit 65ba313
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions bp-rbe-core.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,15 +180,14 @@ public function admin_notice() {
public function load_inbound_provider() {
$selected = bp_rbe_get_setting( 'inbound-provider' );

// default to mandrill if no provider specified
if ( empty( $selected ) ) {
$selected = 'mandrill';
}

$providers = self::get_inbound_providers();

if ( isset( $providers[$selected] ) && class_exists( $providers[$selected] ) ) {
$this->inbound_provider = new $providers[$selected];

// Default to SendGrid if no provider is valid.
} else {
$this->inbound_provider = new $providers['sendgrid'];
}
}

Expand Down

0 comments on commit 65ba313

Please sign in to comment.