@@ -31,7 +31,7 @@ class SendGridTransport implements Swift_Transport {
3131
3232 /**
3333 * Sendgrid api key.
34- *
34+ *
3535 * @var string
3636 */
3737 private $ sendGridApiKey ;
@@ -55,10 +55,10 @@ public function stop() {
5555
5656 /**
5757 * WARNING : $failedRecipients and return value are faked
58- *
58+ *
5959 * @param Swift_Mime_Message $message
6060 * @param array $failedRecipients
61- * @return int
61+ * @return int
6262 */
6363 public function send (Swift_Mime_Message $ message , &$ failedRecipients = null ) {
6464
@@ -102,7 +102,7 @@ public function send(Swift_Mime_Message $message, &$failedRecipients = null) {
102102 $ prepareFailedRecipients [] = $ email ;
103103 }
104104 }
105-
105+
106106 // process BCC
107107 if ($ bccArr = $ message ->getBcc ()) {
108108 foreach ($ bccArr as $ email => $ name ) {
@@ -135,19 +135,19 @@ public function send(Swift_Mime_Message $message, &$failedRecipients = null) {
135135
136136 // only 2xx status are ok
137137 if (
138- $ response ->_status_code < self ::STATUS_OK_SUCCESSFUL_MIN_RANGE ||
139- self ::STATUS_SUCCESSFUL_MAX_RANGE < $ response ->_status_code ) {
140-
138+ $ response ->statusCode () < self ::STATUS_OK_SUCCESSFUL_MIN_RANGE ||
139+ self ::STATUS_SUCCESSFUL_MAX_RANGE < $ response ->statusCode () ) {
140+
141141 // to force big boom error uncomment this line
142- //throw new \Swift_TransportException("Error when sending message. Return status :".$response->_status_code );
143-
142+ //throw new \Swift_TransportException("Error when sending message. Return status :".$response->statusCode() );
143+
144144 // copy failed recipients
145145 foreach ($ prepareFailedRecipients as $ recipient ) {
146146 $ failedRecipients [] = $ recipient ;
147147 }
148148 $ sent = 0 ;
149149 }
150-
150+
151151 return $ sent ;
152152 }
153153
0 commit comments