SendFailedDialog sfd = getNewMessageUI().showSendFailedDialog(mailServer, (MessagingException) me);
if (sfd.resendMessage()) {
OutgoingMailServer newServer = sfd.getMailServer();
if (newServer != null) {
String action = sfd.getMailServerAction();
UserProfile profile = getNewMessageUI().getSelectedProfile();
if (action == SendFailedDialog.S_SESSION_DEFAULT) {
profile.setTemporaryMailServer(newServer);
} else if (action == SendFailedDialog.S_CHANGE_DEFAULT) {
Pooka.setProperty(profile.getUserProperty() + ".mailServer", newServer.getItemID());
}
newServer.sendMessage(getNewMessageInfo());
}
} else if (sfd.getSaveToOutbox()) {
try {