com.objectwave.networkUtility
Class SendMail
java.lang.Object
|
+--com.objectwave.networkUtility.SendMail
- public class SendMail
- extends java.lang.Object
HELO (name of sending machine) MAIL FROM: (name of sender) RCPT TO: (name of
recipient) DATA (mail message....................... .................) .
(this full stop is the delimiter for the mail message) QUIT There are two
possible system parameters. ow.fromMailAddress=
ow.emailServer=
- Version:
- 1.0
- Author:
- dhoag
Method Summary |
protected java.net.Socket |
connectToMailServer()
|
static void |
main(java.lang.String[] args)
The first argument is an email address. |
void |
sendFileAsText(java.lang.String toMailAddress,
java.io.FileInputStream fis,
java.io.BufferedInputStream buff)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SendMail
public SendMail()
main
public static void main(java.lang.String[] args)
- The first argument is an email address. The second argument is a file name
to send as text. Third could be a target mailServer. Fourth is the senders
email address.
- Parameters:
args
- The command line arguments
sendFileAsText
public void sendFileAsText(java.lang.String toMailAddress,
java.io.FileInputStream fis,
java.io.BufferedInputStream buff)
- Parameters:
toMailAddress
- fis
- buff
-
connectToMailServer
protected java.net.Socket connectToMailServer()
throws java.io.IOException
- Returns:
-
- Throws:
java.io.IOException