Created
January 4, 2012 18:29
-
-
Save uid0/1561361 to your computer and use it in GitHub Desktop.
Email Testing
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 characters
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"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment