1<?php 2/***************************************************\ 3 * 4 * Mailer (https://github.com/txthinking/Mailer) 5 * 6 * A lightweight PHP SMTP mail sender. 7 * Implement RFC0821, RFC0822, RFC1869, RFC2045, RFC2821 8 * 9 * Support html body, don't worry that the receiver's 10 * mail client can't support html, because Mailer will 11 * send both text/plain and text/html body, so if the 12 * mail client can't support html, it will display the 13 * text/plain body. 14 * 15 * Create Date 2012-07-25. 16 * Under the MIT license. 17 * 18 \***************************************************/ 19/** 20 * Created by PhpStorm. 21 * User: msowers 22 * Date: 3/30/15 23 * Time: 2:42 PM 24 */ 25 26namespace Tx\Mailer\Exceptions; 27 28 29class CodeException extends SMTPException 30{ 31 public function __construct($expected, $received, $serverMessage = null) 32 { 33 $message = "Unexpected return code - Expected: {$expected}, Got: {$received}"; 34 if (isset($serverMessage)) { 35 $message .= " | " . $serverMessage; 36 } 37 parent::__construct($message); 38 } 39 40} 41