Wednesday, September 3, 2003 06:36 AM
You can use the JavaMail API, that's what it's for (at least, the sending part of it); there are lots of examples and FAQ's.
Or do you want to talk ESMTP/SMTP manually yourself? that's pretty easy too, at least for the basics (and assuming your local host is authorized to connect, to your smtp server). Been talking SMTP manually when necessary now, for 20 years or so.
tcp socket on port 25, "EHLO yourhostname" (or "HELO" to make it even simpler), wait for response; "MAIL FROM", wait for "OK" response; "RCPT TO", wait for response; "DATA", wait for response; message text, then end with a solitary ".")