Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as Plain Text by richard ( 14 years ago )
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mail_ssc;

import java.io.IOException;


/**
 *
 * @author Richard
 */
 
public class Mailsendercommand {

    public static void main(String [] args) {

        if (args.length == 0) {
            System.out.println("No arguments, run with help for a list of commands.");
        } else if (args.length == 1 && args[0].matches("help")) {
            System.out.println("You need help!");
        } else if (args.length == 7) {
            try {
                Mail_sender mailSender = new Mail_sender(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
            } 
            catch (IOException ex) {
                System.out.println("Didnt send message.");
            }
        } else {
            System.out.println(" help needed");   
        }
    }
}

 

Revise this Paste

Your Name: Code Language: