1. 程式人生 > >JavaMail開發535 5.7.8 authentication failed錯誤處理

JavaMail開發535 5.7.8 authentication failed錯誤處理

手動新增密碼驗證即可:

Session session = Session.getInstance(props,new Authenticator() {
			protected PasswordAuthentication getPasswordAuthentication(){
				return new PasswordAuthentication("username", "password");
			}
		});