context.arch.util
Class SendMail
java.lang.Object
|
+--context.arch.util.SendMail
- public class SendMail
- extends java.lang.Object
This class contacts a machine's POP port and uses it to send an email
message.
|
Constructor Summary |
SendMail()
Basic empty constructor |
|
Method Summary |
static void |
main(java.lang.String[] args)
Simple main method that creates the SendMail class and
sends a mail using parameters from the command line |
void |
send(java.io.BufferedReader in,
java.io.BufferedWriter out,
java.lang.String s)
This method writes data to a BufferedWriter and reads the
response in a BufferedReader. |
void |
send(java.io.BufferedWriter out,
java.lang.String s)
This method writes data to a BufferedWriter. |
void |
sendMail(java.lang.String sendAddress,
java.lang.String mailServer,
java.lang.String sender,
java.lang.String recipient,
java.lang.String subject,
java.lang.String message)
This method sends an email message. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
SendMail
public SendMail()
- Basic empty constructor
sendMail
public void sendMail(java.lang.String sendAddress,
java.lang.String mailServer,
java.lang.String sender,
java.lang.String recipient,
java.lang.String subject,
java.lang.String message)
- This method sends an email message.
- Parameters:
sendAddress - The address of the machine requesting the sendmailServer - The machine to contact to use for sending the messagesender - The email addres of the sending personrecipient - The email address of the person the message is being sent tosubject - The subject of the email messagemessage - The actual content of the mail message to send
send
public void send(java.io.BufferedReader in,
java.io.BufferedWriter out,
java.lang.String s)
- This method writes data to a BufferedWriter and reads the
response in a BufferedReader.
- Parameters:
in - BufferedReader to read the response fromout - BufferedWriter to write data tos - The data to write out
send
public void send(java.io.BufferedWriter out,
java.lang.String s)
- This method writes data to a BufferedWriter.
- Parameters:
out - BufferedWriter to write data tos - The data to write out
main
public static void main(java.lang.String[] args)
- Simple main method that creates the SendMail class and
sends a mail using parameters from the command line