|
WebLogic Server 7.0 Code Examples, BEA Systems, Inc. | |||||
See:
Description
| Class Summary | |
| MailServlet | This example servlet takes input from a html form, and calls the SendMail class based on it. |
| SendMessage | This example SendMessage class simply invokes the javax.mail classes, and sends a message blindly passing the strings passed to it. |
This example illustrates how to use javamail with WebLogic Server. It demonstrates:
| Additional Resources for examples.javamail | |
| MailExample.html | The html form page that calls the MailServlet. |
| build.xml | The Java Ant build script assembles and deploys the application. |
The following sections describe how to build and run the example:
The following build script is provided for you to build the example: build.xml
Run the build script using the following Java ant command:
prompt> antThe script will build the example and place the files in the correct locations in your WebLogic Server distribution:
mail.host=mail.mycompany.com mail.user=joe
mail.debug=trueFor more information on javamail properties, see Using JavaMail with WebLogic Server Applications.
http://WebLogicURL:WebLogicPort/examplesWebApp/MailExample.htmlFor example, the following illustrates how you load the servlet in a browser running on the same NT host as your WebLogic Server on port 7001:
http://localhost:7001/examplesWebApp/MailExample.htmlIf the servlet executes correctly you will see "Your message has been sent" in the browser.
|
Documentation is available at http://e-docs.bea.com/wls/docs70 |
|||||