diff --git a/include/class.ticket.php b/include/class.ticket.php
index 279d7e4e478938733ec5008e5b61f95f14a5ce24..13fea02f055e0b16baa0e9ed85a59164157ac315 100644
--- a/include/class.ticket.php
+++ b/include/class.ticket.php
@@ -2230,7 +2230,7 @@ class Ticket {
             $msg = $ticket->replaceVars($msg->asArray(), array(
                 'message' => $message,
                 'signature' => $signature,
-                'response' => $response->getBody(),
+                'response' => ($response) ? $response->getBody() : '',
             ));
 
             if($cfg->stripQuotedReply() && ($tag=trim($cfg->getReplySeparator())))