import javax.mail.*;
import javax.mail.internet.*;
import javax.mail.internet.MimeMessage.*;
import java.util.*;

public class MainDriver {

	public static void main(String[] args) {
		try {
			Properties props = new Properties();
			// props.put("mail.smtp.host", "smtp.clemson.edu");
			props.put("mail.smtp.host", "mail.charter.net");
			
			
			Session session = Session.getDefaultInstance(props, null);
			
			Message msg = new MimeMessage(session);
			msg.setRecipient(RecipientType.TO, new InternetAddress("chochrine@charter.net"));
			msg.setSubject("Test Message");
			msg.setFrom(new InternetAddress("cashiel@cs.clemson.edu"));
			msg.setText("This is a test message");
			
			Transport.send(msg);
			System.out.println("Message sent");
		} catch (Exception exc) {
			System.out.println("Exception: " + exc);
		}
	}

}
