SmtpResponseLine.parse constructor
SmtpResponseLine.parse(
- String text
Parses the given response text.
Implementation
factory SmtpResponseLine.parse(String text) {
final code = int.tryParse(text.substring(0, 3));
final message = (code == null) ? text : text.substring(4);
return SmtpResponseLine(code ?? 500, message);
}