comparison src/nabble/view/web/mailing_list/Unsubscribe2.jtp @ 0:7ecd1a4ef557

add content
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 21 Mar 2019 19:15:52 -0600
parents
children 18cf4872fd7f
comparison
equal deleted inserted replaced
-1:000000000000 0:7ecd1a4ef557
1 <%
2 package nabble.view.web.mailing_list;
3
4 import java.io.IOException;
5 import java.io.PrintWriter;
6
7 import javax.servlet.ServletException;
8 import javax.servlet.http.HttpServlet;
9 import javax.servlet.http.HttpServletRequest;
10 import javax.servlet.http.HttpServletResponse;
11
12 import nabble.model.Node;
13 import nabble.model.ListServer;
14 import nabble.model.MailingList;
15 import nabble.model.ModelHome;
16 import nabble.model.User;
17 import nabble.view.lib.Jtp;
18 import nabble.view.lib.Shared;
19 import fschmidt.util.mail.MailAddress;
20
21
22 public final class Unsubscribe2 extends HttpServlet {
23
24 protected void service(HttpServletRequest request,HttpServletResponse response)
25 throws ServletException, IOException
26 {
27 PrintWriter out = response.getWriter();
28 String context = request.getContextPath();
29 User user = Jtp.getUser(request,response);
30 if( user==null ) {
31 Jtp.login("You must login to be able to subscribe to a list.",request,response);
32 return;
33 }
34 Node forum = Jtp.getSiteNotNull(request).getNode(Long.parseLong(request.getParameter("forum")));
35 MailingList mailingList = forum.getAssociatedMailingList();
36 ListServer listServer = mailingList.getListServer();
37 MailAddress emailAddress = new MailAddress(user.getEmail(), user.getName());
38 %>
39 <html>
40 <head>
41 <%
42 Shared.title(request,response,"Subscribe to mailing list");
43 %>
44 </head>
45 <body>
46 <% Shared.minHeader(request, response, forum); %>
47 <h1>Unsubscription Request Was Sent</h1>
48 <p>
49 An unsubscription request was sent on your behalf to the mailing list: <strong><%=mailingList.getListAddress()%></strong>.
50 </p>
51 <p>
52 You will soon receive a confirmation request by email at <strong><%=user.getEmail()%></strong>. Please follow the
53 instructions in this request to unsubscribe from the mailing list.
54 </p>
55 <p>
56 <strong>Remember:</strong> You are not unsubscribed from the <strong><%=mailingList.getListAddress()%></strong> list until you have followed the instructions in the email.
57 </p>
58
59 <br /><br />
60 <p>&#171; <a href="<%=Jtp.path(forum)%>">Return to forum</a></p>
61 <%
62 Shared.footer(request,response);
63 Shared.analytics(request,response);
64 %>
65 </body>
66 </html>
67 <%
68 }
69 }
70 %>