FileDocCategorySizeDatePackage
MailClient.javaAPI DocExample622Sun Mar 28 19:06:02 BST 1999None

MailClient

public class MailClient extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)


    if (args.length == 0) {
      System.err.println("Usage: java MailClient username@host.com");
      return;
    }
    
    try {
      URL u = new URL("mailto:" + args[0]);
      URLConnection uc = u.openConnection();
      uc.setDoOutput(true);
      uc.connect();
      OutputStream out = uc.getOutputStream();
      StreamCopier.copy(System.in, out);
      out.close();
    }
    catch (IOException e) {
      System.err.println(e);
    }