Created
January 4, 2012 18:29
-
-
Save uid0/1561361 to your computer and use it in GitHub Desktop.
Revisions
-
uid0 created this gist
Jan 4, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ import org.apache.commons.mail.*; public class EmailTest { /** * @param args */ public static void main(String[] args) { System.out.println("Attempting to send email"); Email email = new SimpleEmail(); try { email.setHostName("10.2.1.9"); email.addTo("[email protected]_doesntwork"); email.setFrom("[email protected]"); email.setMsg("This is a bounce test email, number one."); email.send(); } catch (EmailException e) { System.out.println("Unable to Send Email"); } } }