Package com.ikanow.infinit.e.data_model.utils

Examples of com.ikanow.infinit.e.data_model.utils.SendMail


              alertText.append("\n");
            }
           
            String to = (Arrays.toString(toModify.getQueryInfo().getAlert().getEmailAddresses().toArray()).replaceAll("[\\[\\]]", "")).replace(',', ';');
            try {
              new SendMail(null, to, alertTitle.toString(), alertText.toString()).send("text/html");
            }
            catch (Exception e) {
              //DEBUG
              //e.printStackTrace();
            }
View Full Code Here


                String subject = pp.getDisplayName() + " is trying to join infinit.e community: " + cp.getName();
                String body = pp.getDisplayName() + " is trying to join infinit.e community: " + cp.getName() + "<br/>Do you want to accept this request?" +
                "<br/><a href=\"" + rootUrl + "social/community/requestresponse/"+cap.get_id().toString() + "/true\">Accept</a> " +
                "<a href=\"" + rootUrl + "social/community/requestresponse/"+cap.get_id().toString() + "/false\">Deny</a>";
               
                SendMail mail = new SendMail(new PropertiesManager().getAdminEmailAddress(), toAddresses, subject, body);
               
                if (mail.send("text/html"))
                {
                  rp.setResponse(new ResponseObject("Join Community",true,"Joined community successfully, awaiting owner approval"));
                  rp.setData(new CommunityApprovalPojo(false));
                }
                else
View Full Code Here

                  String subject = "Invite to join infinit.e community: " + cp.getName();
                  String body = "You have been invited to join the community " + cp.getName() +
                    "<br/><a href=\"" + rootUrl + "social/community/requestresponse/"+cap.get_id().toString() + "/true\">Accept</a> " +
                    "<a href=\"" + rootUrl + "social/community/requestresponse/"+cap.get_id().toString() + "/false\">Deny</a>";
                 
                  SendMail mail = new SendMail(new PropertiesManager().getAdminEmailAddress(), pp.getEmail(), subject, body);
                 
                  if (mail.send("text/html"))
                  {
                    if (isSysAdmin) {
                      rp.setResponse(new ResponseObject("Invite Community",true,"Invited user to community successfully: " + cap.get_id().toString()));
                    }
                    else {
View Full Code Here

 
        // Message Body
        String body = "<p>Your new password is: " + newpassword + "</p>";
 
        // Send
        new SendMail(new PropertiesManager().getAdminEmailAddress(), ap.getUsername(), subject, body).send("text/html")
 
        // (Remove new password from end of this message once mailing works, Currently attached just so can use)
        rp.setResponse(new ResponseObject("Reset Password",true,"Password reset successfully, new password has been emailed to user."));
      }//TESTED
      else
      { // Two stage process ... first "forgotten password" just sends email containing link to click on
       
        // To avoid people just hitting this button 1000 times, ensure only sent once per 5 minutes
        if ((now.getTime() - ap.getModified().getTime()) < 300000L) { // ie 300s ie 5mins
          rp.setResponse(new ResponseObject("Reset Password",true,"Password reset request ignored, try later."));
          return rp;
        }//TESTED
       
        // Update auth to ensure this isn't abused
        ap.setModified(now);
        DbManager.getSocial().getAuthentication().save(ap.toDb());
       
        //email new password
        // Subject Line
        String subject = "Request to reset password";
 
        PropertiesManager props = new PropertiesManager();
       
        // Message Body
        StringBuffer newLink = new StringBuffer(props.getUrlRoot()).append("auth/forgotpassword").
                              append("?username=").append(URLEncoder.encode(username, "UTF-8")).
                              append("&password=").append(URLEncoder.encode(ap.getPassword(), "UTF-8"));
        String body = "<p>Click on this link to reset password: " + newLink.toString() + "</p>";
 
        // Send
        new SendMail(props.getAdminEmailAddress(), ap.getUsername(), subject, body).send("text/html")
 
        // (Remove new password from end of this message once mailing works, Currently attached just so can use)
        rp.setResponse(new ResponseObject("Reset Password",true,"Email has been sent containing link to reset password."));
      }//TESTED
    }
View Full Code Here

        "<p>Please click on the Approve or Reject links below to complete the approval process: </p>" +
        "<li><a href=\"" + rootUrl + "social/community/requestresponse/" + cap.get_id().toString() + "/true\">Approve new Source</a></li>" +
        "<li><a href=\"" + rootUrl + "social/community/requestresponse/" + cap.get_id().toString() + "/false\">Reject new Source</a></li>";             
     
      // Send
      new SendMail(new PropertiesManager().getAdminEmailAddress(), sendTo.toString(), subject, body).send("text/html")
    }
    return true;
  }
View Full Code Here

    "URL: " + source.getRepresentativeUrl() + "<br/>" +
    "</p>" +
    "<p>Was <b>" + decision + "</b> by " + approver.getDisplayName() + "</p>";

    // Send
    new SendMail(new PropertiesManager().getAdminEmailAddress(), submitter.getEmail(), subject, body).send("text/html")
    return true;
  }
View Full Code Here

TOP

Related Classes of com.ikanow.infinit.e.data_model.utils.SendMail

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.