Skip to content

Commit

Permalink
SendGrid: Fix user agent check during inbound parsing.
Browse files Browse the repository at this point in the history
SendGrid changed their user agent from "SendGrid" to "Sendlib" for their
inbound POST response, which broke inbound reply-by-email parsing.

Props @boonebgorges.

See #100.
  • Loading branch information
r-a-y committed Jun 23, 2017
1 parent a8cb0fc commit 10ba16f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class BP_Reply_By_Email_Inbound_Provider_SendGrid extends BP_Reply_By_Email_Inbo
* Webhook parser class method for SendGrid.
*/
public function webhook_parser() {
if ( empty( $_SERVER['HTTP_USER_AGENT'] ) || ( ! empty( $_SERVER['HTTP_USER_AGENT'] ) && 0 !== strpos( $_SERVER['HTTP_USER_AGENT'], 'SendGrid' ) ) ) {
if ( empty( $_SERVER['HTTP_USER_AGENT'] ) || ( ! empty( $_SERVER['HTTP_USER_AGENT'] ) && 0 !== strpos( $_SERVER['HTTP_USER_AGENT'], 'Sendlib' ) ) ) {
return;
}

Expand Down

0 comments on commit 10ba16f

Please sign in to comment.