Browses in QAD .NET UI > Browse URL Maintenance > Browse URL Link to E-mail
  
Browse URL Link to E-mail
You can also define a URL link that will launch e-mail from within a browse. This feature is useful, for example, when you are viewing purchase orders or sales orders and need to get e-mail confirmation or update on order details.
In the following example, you configure an e-mail link for fields in Purchase Order Browse. The e-mail link automatically creates an e-mail with the message header:
Changes requested to Purchase Order order number Line line number
where the order number and line number are retrieved from the purchase order you select in the browse results screen.
The e-mail body contains the message:
We request you to change PO order number, Line: line number, Due Date: PO due date
You must create a .JSP file that contains the message header and body, and also contains the code that retrieves values for each of the fields in the message from the browse. The .JSP file also invokes the mail client configured for this client instance. The .JSP file is stored on the Tomcat appserver directory, and is called by the URL link when the link is activated.
Use the following steps:
1 Navigate to the QAD UI desktop Tomcat directory; for example, /TomcatInstallDir/webapps/<application>/.
2 Create a .JSP file called mail.jsp in this directory.
This file invokes the e-mail client and retrieves values for the following purchase order fields:
Purchase Order (pod_nbr); Line Number (pod_line); Due Date (pod_due_date)
You also specify these fields in the URL you define in Browse URL Maintenance for the browse.
Use the following sample code for the file:
<html>
<head> <title>Changes requested to Purchase Order</title> </head>
<body>
<a href="mailto:<%=request.getParameter("mailto")%>?subject=Changes requested to Purchase Order <%=request.getParameter("podnbr")%> Line <%=request.getParameter("podline")%>&body=We request you to change PO: <%=request.getParameter("podnbr")%>, Line: <%=request.getParameter("podline")%>, Due Date: <%=request.getParameter("podduedate")%>.">Send a mail.</a>
<br>
</body>
</html>
You now define the URL link in Browse URL Maintenance.
3 In Browse URL Maintenance, select Purchase Order Browse as the browse for which you want to create the e-mail link.
4 Specify pod_nbr as the field for which you want to add a link.

Browse URL Maintenance, Email Link
5 Enter the following URL:
http://<your server>:<port number>/webapps/<application>/mail.jsp?mailto=PurchasingOffice@qad.com&pod_nbr=#b#pod_nbr#e#&podline=#b#pod_line#e#&pod_due_date#b#pod_due_date#e#.
where <your server>:<port number>/webapps/<application> is the name and port number of your server, and <application> is the home directory of your application. In the section mailto=PurchasingOffice@qad.com is the e-mail address to which the e-mail is to be sent, and mailto is the parameter used in the JSP file.
Note that every browse field begins with #b# and ends with #e#.
6 Ensure that your client PC is configured to invoke the correct e-mail client
In your Web browser, open Internet Options|Programs, and select the e-mail program of choice.

Internet Options, Email Configuration
7 In QAD Enterprise Applications, Select Purchase Order Browse.
8 Right-click on the Purchase Order column.
9 Click Send Email.

Purchase Order Browse, Send Email option
10 Click the Send a Mail link on the screen.

Purchase Order Browse, Email Link