one simple way to do this is using this package:
sun.net.smtp.SmtpClient You just have to import, and it comes with the J2SE, so don't
have to do anythin'
But you need to have an SMTP server running.
import sun.net.smtp.SmtpClient;
and do : sun.net.smtp.SmtpClient sm = new sun.net.smtp.SmtpClient(mserver);
mserver is your SMTP server name. Can be the ip address if you like.
then:
sm.from("rfrom");
sm.to("rto@here");
rfrom and rto can be any String type, rto have to be email address of course. then do:
PrintStream msg = sm.startMessage();
add:...
msg.println("To: ");
msg.println(rto);
msg.print("Subject: ");
msg.println("your message");
msg.println();
sm.closeServer();
That's it ! Don't forget to try and catch to see if this throws exceptions!
From:
Kurt
*********************************************************************************
- NOTICE -
The information transmitted is intended only for the person or entity
to which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of,
or taking of any action in reliance upon, this information by persons
or entities other than the intended recipient is prohibited. If you
have received this email in error, please notify the sender and delete
the material from your computer.
Internet communications are not secure. You should scan this message
and any attachments for viruses. Under no circumstances do we accept
liability for any loss or damage which may result from your receipt of
this message or any attachments.
*********************************************************************************
--
To unsubscribe: <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>