try { String aString = pwdField.getText().replace("\\", "/"); //System.out.println(aString+"====="); Youhua aYouhua = new Youhua(); if (aYouhua.run("XX", id.getText(),pw.getText(), aString)==1) { JOptionPane.showMessageDialog(null, "发送成功"); } } catch (FileNotFoundException e2) { // TODO: handle exception JOptionPane.showMessageDialog(null, "请选择excel文件"); } catch (OfficeXmlFileException e2) { // TODO: handle exception JOptionPane.showMessageDialog(null, "请选择2003版本的xls文件"); } catch (AuthenticationFailedException e2) { // TODO: handle exception JOptionPane.showMessageDialog(null, "用户密码错误"); } catch (Exception e1) { // TODO Auto-generated catch block //JOptionPane.showMessageDialog(null, "账号密码错误或是excel文件下有空白内容或选择的文件不是excel文件"); JOptionPane.showMessageDialog(null, "已被对方邮箱屏蔽,请稍后再试"); }
|