Mercurial Hosting > nabble
view src/nabble/view/web/mailing_list/Unsubscribe2.java @ 19:18cf4872fd7f
remove anonymous posting
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 29 May 2020 22:58:25 -0600 |
parents | 7ecd1a4ef557 |
children |
line wrap: on
line source
package nabble.view.web.mailing_list; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import nabble.model.Node; import nabble.model.ListServer; import nabble.model.MailingList; import nabble.model.ModelHome; import nabble.model.User; import nabble.view.lib.Jtp; import nabble.view.lib.Shared; import fschmidt.util.mail.MailAddress; public final class Unsubscribe2 extends HttpServlet { protected void service(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException { PrintWriter out = response.getWriter(); String context = request.getContextPath(); User user = Jtp.getUser(request); if( user==null ) { Jtp.login("You must login to be able to subscribe to a list.",request,response); return; } Node forum = Jtp.getSiteNotNull(request).getNode(Long.parseLong(request.getParameter("forum"))); MailingList mailingList = forum.getAssociatedMailingList(); ListServer listServer = mailingList.getListServer(); MailAddress emailAddress = new MailAddress(user.getEmail(), user.getName()); out.print( "\r\n<html>\r\n<head>\r\n" ); Shared.title(request,response,"Subscribe to mailing list"); out.print( "\r\n</head>\r\n<body>\r\n" ); Shared.minHeader(request, response, forum); out.print( "\r\n<h1>Unsubscription Request Was Sent</h1>\r\n<p>\r\n An unsubscription request was sent on your behalf to the mailing list: <strong>" ); out.print( (mailingList.getListAddress()) ); out.print( "</strong>.\r\n</p>\r\n<p>\r\n You will soon receive a confirmation request by email at <strong>" ); out.print( (user.getEmail()) ); out.print( "</strong>. Please follow the\r\ninstructions in this request to unsubscribe from the mailing list.\r\n</p>\r\n<p>\r\n <strong>Remember:</strong> You are not unsubscribed from the <strong>" ); out.print( (mailingList.getListAddress()) ); out.print( "</strong> list until you have followed the instructions in the email.\r\n</p>\r\n\r\n<br /><br />\r\n<p>« <a href=\"" ); out.print( (Jtp.path(forum)) ); out.print( "\">Return to forum</a></p>\r\n" ); Shared.footer(request,response); Shared.analytics(request,response); out.print( "\r\n</body>\r\n</html>\r\n" ); } }