View difference between Paste ID: nHxj584H and ESCW2yng
SHOW: | | - or go back to the newest paste.
1
try {
2
        mtwin.mail.Smtp.send(smtpHost, from, to, mail.get(), port, username, password);
3
}
4
catch (e:Exception) {
5
        switch(e) {
6-
                case ConnectionError(host, port): throw "Could  not send mail, error connecting to: ("  + smtpHost + ")";
6+
                case ConnectionError(host, port): throw "Could  not send mail, error connecting to: ("  + host + ") on port: (" + port + ")";
7
                default: throw e;
8
        }
9
}