Return a Response object that looks like a BYE protocol response. Include the details of the exception in the response string. @param ex the exception @return the synthetic Response object
(Exception ex)
| 138 | * @return the synthetic Response object |
| 139 | */ |
| 140 | public static Response byeResponse(Exception ex) { |
| 141 | String err = "* BYE Jakarta Mail Exception: " + ex.toString(); |
| 142 | err = err.replace('\r', ' ').replace('\n', ' '); |
| 143 | Response r = new Response(err); |
| 144 | r.type |= SYNTHETIC; |
| 145 | r.ex = ex; |
| 146 | return r; |
| 147 | } |
| 148 | |
| 149 | /** |
| 150 | * Does the server support UTF-8? |
no test coverage detected