Use of the Java Mail API isn't going to be any different in a Struts Action that it would be in a Servlet. You should be able to pretty much cut and paste the code from your Servlet into an Action class. Better yet, create a POJO that handles interaction with Java Mail having methods that can be called either from a Servlet or an Action class.
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider()); new GoogleMailSender().sendSSLMessage( sendTo, emailSubjectTxt, emailMsgTxt, emailFromAddress); System.out.println("Sucessfully Sent mail to All Users"); }//end main
}//end class [ July 03, 2008: Message edited by: kaan h. ]
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com