Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

MailToolTest.java

Go to the documentation of this file.
00001 package net.threebit.utils.sosc.test;
00002 
00003 /*
00004         Copyright 2003 Shawn Deleurme
00005         Copyright 2003 Kevin O'Donnell
00006 
00007         This program is free software; you can redistribute it and/or modify
00008         it under the terms of the GNU General Public License as published by
00009         the Free Software Foundation; either version 2 of the License, or
00010         (at your option) any later version.
00011 
00012         This program is distributed in the hope that it will be useful,
00013         but WITHOUT ANY WARRANTY; without even the implied warranty of
00014         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015         GNU General Public License for more details.
00016 
00017         You should have received a copy of the GNU General Public License
00018         along with this program; if not, write to the Free Software
00019         Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020 */
00021 
00022 import java.io.*;
00023 import java.util.*;
00024 import java.util.logging.*;
00025 import junit.framework.*;
00026 import net.threebit.utils.sosc.*;
00027 
00032 public class MailToolTest extends TestCase {
00033 
00034         public void test2() throws Exception {
00035                 MailMessage s = MailTool.newMessage();
00036                 s.setFrom("kevin.odonnell@corp.canadareconnect.com","Kevin From");
00037                 s.setSubject("This is a test.");
00038                 s.addRecipient("kevin.odonnell@corp.canadareconnect.com","Kevin To O'Donnell");
00039                 s.data("Body of text.");
00040                 s.data("Body of text.");
00041                 s.attachement(new File("/tmp/adv-supression-file14917.txt"));
00042                 s.send();
00043         }
00044 
00045         public void test1() throws Exception {
00046                 if (true) { return; }
00047                 MailMessage s = MailTool.newMessage();
00048                 s.setFrom("kevino@kevino.net","From Kevin");
00049                 s.setSubject("This is a test.");
00050                 s.addRecipient("kevin.odonnell@corp.canadareconnect.com","Kevin To O'Donnell");
00051                 for (int x = 0; x < 100; x++) {
00052                         s.data("Just chillin on line number " + x);
00053                 }
00054                 System.out.println(new Date() + "                     send()");
00055                 s.send();
00056                 System.out.println(new Date() + "                     sent()");
00057         }
00058 
00059 }

Generated on Mon Jul 14 17:19:20 2003 for SOSC by doxygen1.2.15