mrc Documentation
michaels, ross & cole, ltd.
http://www.mrc-productivity.com/
|
|
How to enable e-mail functionality
through Servlet Reports
Thanks
to Javamail and mrc, you now have the ability to
email your reports directly through your application. Configuring your
application just takes a few minutes.
1)
Build
and compile your application as you always have done.
2)
Click
the “Paint” icon on the “Manage Reports” screen.
3)
Within
the pain application, click the “Application Properties” button:

4)
Click
the E-mail Options Tab. Be sure to change the value of email_option to “yes”. Additionally, be sure to change the sending_go value. sending_go is a redirect page
that your users will be sent to after they run the report. Click OK when
finished. Be sure to click “Save” before exiting.

5)
Due
to the changes you made in step 4, when you run your report, you will now have
the opportunity to see/modify e-mail options.

Be sure the checkbox by
“Send” is selected. Enter TO: and CC: addresses. Click “Run Report.”
You’re almost there…just a few more changes
Now that your report
displays the email option, you need to configure your mrc_servlets.properties
to handle e-mail.
1)
In
the mrc Hub application, click “Data Dictionary.” Select “Paint Data
Dictionary.”
2) Click “Servlet
Properties” (Note: If there are two sections of “Servlet Properties.” Please select
the one under the “Classic Servlets” heading.
3) You should see a screen similar to this:

Be sure the last two
lines of the document are
mail_server
= “”
sender = “”
Note: If these two
lines are not in your .properties file, please type them in.
4) On the mail_server line, be sure to enter your mail server within
the quotations.
Note: Do not add http://, smtp://,
or www before the address as they are not needed.
5) On the sender line,
be sure to enter the address that you want the email report to be seen as the
sender.
6) Click Save.
Congratulations – you have just
configured your mrc Reports to be sent through email!
---
My e-mail never came through –
what’s wrong?
Javamail requires a JDK of at least 1.4. You can check this by
entering “go licpgm” on your green screen and
selecting option 10. Check for program 5722JV1. If you do not have JDK1.4 you
can obtain in from IBM or on the media that shipped with your iSeries, depending
on its age.
Unfortunately,
some customers can not utilize this feature due to incompatibilities with the
set up of their e-mail server. Testing to see if your email is successfully
being sent to the mail server is a quick process.
Open Tomcat interactively (for m-Power users, this means through a batch), for
(mrc-Productivity Series users, this means running Tomcat through q-shell).
As
you are sending your report through email, keep an eye on your Tomcat log. You
will be looking for a command called “md.send”
Here is an example of an unsuccessful send due to the mrc_servlets.properties
file not containing the mail_server =”” line:
![]()
Here is
another example of an unsuccessful send due to a bad server name being listed
in the mrc_servlets.properties file, where server2 was the value entered in the
mrc_servlets.properties file:
![]()
Here is
another example of an unsuccessful send due to no sender value being defined in
the mrc_servlets.properties file:
![]()
If you do
not see these messages, then it is most likely because your message is being
sent to the mail server but not handled due to configuration issues. Check with
your e-mail technician.