Hey guys.
I'm searching for an "one-liner" for mailing within jsp. I just wanna send the values of 5 parameters to the webmasters mail-address. Any ideas for a short solution?
Hey guys.
I'm searching for an "one-liner" for mailing within jsp. I just wanna send the values of 5 parameters to the webmasters mail-address. Any ideas for a short solution?
More like a 6-liner, but you can use commons-email:
import org.apache.commons.mail.SimpleEmail;
...
SimpleEmail email = new SimpleEmail();
email.setHostName("mail.myserver.com");
email.addTo("[email protected]", "John Doe");
email.setFrom("[email protected]", "Me");
email.setSubject("Test message");
email.setMsg("This is a simple test of commons-email");
email.send();