From fa787aa82b481076dd50d4d6b954d302f44f9637 Mon Sep 17 00:00:00 2001 From: phpnut Date: Wed, 26 Mar 2008 03:49:30 +0000 Subject: [PATCH] "Closes #4304, EmailComponent::!__getSmtpResponse not handling multiline messages" git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6601 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/controller/components/email.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cake/libs/controller/components/email.php b/cake/libs/controller/components/email.php index e1b89b02b..630b9a7c5 100644 --- a/cake/libs/controller/components/email.php +++ b/cake/libs/controller/components/email.php @@ -731,7 +731,15 @@ class EmailComponent extends Object{ * @access private */ function __getSmtpResponse() { - $response = @fgets($this->__smtpConnection, 512); + $response = ""; + + while($str = @fgets($this->__smtpConnection, 512)) { + $response .= $str; + + if(substr($str, 3, 1) == " ") { + break; + } + } return $response; } /**