Skip to content

Commit 10ba16f

Browse files
committed
SendGrid: Fix user agent check during inbound parsing.
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.
1 parent a8cb0fc commit 10ba16f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

includes/classes/bp-reply-by-email-inbound-provider-sendgrid.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class BP_Reply_By_Email_Inbound_Provider_SendGrid extends BP_Reply_By_Email_Inbo
2626
* Webhook parser class method for SendGrid.
2727
*/
2828
public function webhook_parser() {
29-
if ( empty( $_SERVER['HTTP_USER_AGENT'] ) || ( ! empty( $_SERVER['HTTP_USER_AGENT'] ) && 0 !== strpos( $_SERVER['HTTP_USER_AGENT'], 'SendGrid' ) ) ) {
29+
if ( empty( $_SERVER['HTTP_USER_AGENT'] ) || ( ! empty( $_SERVER['HTTP_USER_AGENT'] ) && 0 !== strpos( $_SERVER['HTTP_USER_AGENT'], 'Sendlib' ) ) ) {
3030
return;
3131
}
3232

0 commit comments

Comments
 (0)