Package com.postmark

Examples of com.postmark.PostmarkMailSender


            mav.addObject("release", env.get("release"));
            mav.addObject("userMessage", "We are not able to send email for resetting your password");
            mav.addObject("adminMessage", "Please set up the following keys in common.properties to enable email sending: postmarkApiKey and postmarkSendAddress");
            return mav;
        }
        PostmarkMailSender sender = new PostmarkMailSender(
              env.get("postmarkApiKey"));



    message.setSubject("Fluxtream Reset password request");
    Map<String, String> vars = new HashMap<String, String>();
    ResetPasswordToken pToken = guestService.createToken(guest.getId());
    vars.put("token", pToken.token);
    vars.put("homeBaseUrl", env.get("homeBaseUrl"));
    if (guest.firstname != null && !guest.firstname.equals(""))
      vars.put("username", guest.firstname);
    else
      vars.put("username", guest.username);
        String mailMessage ="Hi " + vars.get("username") + ",\n" +
                            "\n" +
                            "Someone requested that your Fluxtream password be reset.\n" +
                            "\n" +
                            "If this wasn't you, there's nothing to worry about - simply ignore this email and nothing will change.\n" +
                            "\n" +
                            "If you DID ask to reset the password on your Fluxtream account, just click here to make it happen:\n" +
                            "\n" +
                            vars.get("homeBaseUrl") + "support/resetPassword?token=" + vars.get("token") + "\n" +
                            "\n" +
                            "Thanks,\n" +
                            "\n" +
                            "The Fluxtream Team";

    message.setText(mailMessage);
    sender.send(message);
    ModelAndView mav = new ModelAndView("support/resetRequestSent");
    mav.addObject("release", env.get("release"));
    return mav;
  }
View Full Code Here

TOP

Related Classes of com.postmark.PostmarkMailSender

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.