Operation

This document describes how to operate the Email Service software contained in the email-service package. The Email Service sofware is a web application providing functionality for sending an electronic mail message to one or more recipients. The following topics can be found in this section:

REST-Based Interface

The Email Service provides functionality to accept email requests from Javascript-based clients (e.g., Feedback Form, Tool Registry, etc.). The Email Service is implemented as a servlet wrapper so that it can be called from client interfaces via a POST request. An HTML form like the following could be used to interface with the service:

<form action="EmailSendingServlet" method="post">   
    <table border="0" width="35%" align="center">
        <tr>
        <td width="50%">Recipient Address(es)</td>
            <td><input type="text" name="recipients" size="50" multiple=true required /></td>
        </tr>
        <tr>
            <td>Subject</td>
            <td><input type="text" name="subject" size="50" /></td>
        </tr>
        <tr>
            <td>Content</td>
            <td><textarea rows="10" cols="70" name="content"></textarea></td>
        </tr>
        <tr>
            <td colspan="2" align="center"><input type="submit" value="Send"/></td>
        </tr>
    </table>
</form>
      

To invoke the Email Service from Javascript-based clients, use the EmailSendingServlet with a POST request. The following parameters may be specified:

ParameterDescription
recipientsOne or more electronic mail addresses separated by a comma.
subjectThe subject of the electronic mail message.
contentThe body of the electronic mail message.

Web Form

To test the Email Service via web browser, go to http://localhost:8080/email-service/, fills out the form and then click 'Send' button. The form will look like this in a web browser:

Email Form

If you want to send an email to multiple recipients, enter the recipient's email addresses separated by a ',' in the Recipient Address(es) text box above.