diff --git a/index.php b/index.php index 2d39a0f..08f95d0 100644 --- a/index.php +++ b/index.php @@ -336,7 +336,11 @@ // Has the user has been specifically CC'd? if ( isset( $inbox_message["cc"] ) ) { - $reply = in_array( "https://{$server}/{$username}", $inbox_message["cc"] ); + if ( is_array( $inbox_message["cc"] ) ) { + $reply = in_array( "https://{$server}/{$username}", $inbox_message["cc"] ); + } else { + $reply = ( "https://{$server}/{$username}" === $inbox_message["cc"] ); + } } else { $reply = false; } @@ -1256,6 +1260,7 @@ HTML; // Set cURL options $ch = curl_init( $url ); curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true ); + curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true ); curl_setopt( $ch, CURLOPT_HTTPHEADER, $headers ); curl_setopt( $ch, CURLOPT_USERAGENT, USERAGENT );