fc.util
Class SimpleMail

java.lang.Object
  extended by fc.util.SimpleMail

public class SimpleMail
extends Object

Sends a simple SMTP message. Useful for sending system and admin alerts from the command line or within an application.

Notes:
Make sure that the CLASSPATH is set properly. If invoked from the command line, the CLASSPATH should include the following classes:

        1. activation.jar  (java activation framework API's, needed for javamail)
        2. mail.jar        (javamail API's)
        3. fc.util.Args    (for parsing arguments)
        
Also, manually do a nslookup and find out the MX for the mail server that you should use. Most any mail servers will not allow relays to email addresses outside of that servers domain, so make sure the recipient is in the same domain as the mail server.


Constructor Summary
SimpleMail()
           
 
Method Summary
static void main(String[] args)
           
static void send(String targetMailServer, String from, String to, String subject, String message, boolean dbg)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleMail

public SimpleMail()
Method Detail

main

public static void main(String[] args)

send

public static void send(String targetMailServer,
                        String from,
                        String to,
                        String subject,
                        String message,
                        boolean dbg)
                 throws Exception
Throws:
Exception