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