Examples of SendMail


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

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

                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

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

                  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

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

 
        // 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

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

        "<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

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

    "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

Examples of developer.SendMail

      messageplayer("self mic push T to talk "+str, null, null);
      break;
    case shutdown: quit(); break;
    case setstreamactivitythreshold: setStreamActivityThreshold(str); break;
    case getlightlevel: docker.getLightLevel(); break;
    case email: new SendMail(str, this); break;
    case uptime: messageplayer(state.getUpTime() + " ms", null, null); break;
    case help: messageplayer(PlayerCommands.help(str),null,null); break;
    case framegrabtofile: FrameGrabHTTP.saveToFile(str); break;
    case memory: messageplayer(Util.memory(), null, null); break;
    case state:
View Full Code Here

Examples of lazyj.mail.Sendmail

    final String sFrom = m.sFrom!=null ? m.sFrom : this.sDefaultFrom;
   
    if (sFrom==null)
      return false;
   
    final Sendmail sm = new Sendmail(sFrom, this.sServerHost, this.iServerPort);
   
    final TreeSet<String> ts = new TreeSet<String>(this.sDefaultTo);
    ts.addAll(m.sTo);
   
    if (ts.size()==0)
      return false;
   
    final Mail mail = new Mail();
    mail.sFrom = sFrom;
    mail.sTo = Message.setToList(ts);
    mail.sBody = m.sMessage!=null ? m.sMessage : this.sDefaultMessage;
    mail.sSubject = m.sSubject!=null ? m.sSubject : this.sDefaultSubject;
   
    if (mail.sBody==null || mail.sSubject==null)
      return false;
   
    return sm.send(mail);
  }
View Full Code Here

Examples of org.projectforge.mail.SendMail

    }
    final String content = getICal(event, type);
    final Mail msg = new Mail();
    msg.setProjectForgeSubject(composeSubject(event, type));
    msg.setContentType(Mail.CONTENTTYPE_HTML);
    final SendMail sendMail = new SendMail();
    sendMail.setConfigXml(ConfigXml.getInstance());
    for (final TeamEventAttendeeDO attendee : event.getAttendees()) {
      msg.setContent(composeHtmlContent(event, attendee.getNumber(), type, marker));
      if (attendee.getUserId() == null) {
        msg.setTo(attendee.getUrl());
      } else {
        msg.setTo(attendee.getUser());
        if (attendee.getUser().equals(PFUserContext.getUser()) == true) {
          continue;
        }
      }
      switch (type) {
        case INVITATION:
          if (sendMail.send(msg, content, event.getAttachments()) == false) {
            failures++;
          }
          break;
        case UPDATE:
        case REJECTION:
          if (sendMail.send(msg, content, null) == false) {
            failures++;
          }
          break;
      }
View Full Code Here

Examples of utility.SendMail

  /**
   * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
   */
  protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    SendMail t = new SendMail();
    UserDAOInterface userDAO = new JDBCUserDAO();
    User user=(User)request.getSession().getAttribute("user");
    String code =userDAO.createAbonnement(user.getLogin(),request.getParameter("duree"));
    try {
      String content="Merci de vous �tres abonn�s sur notre site de jeux en ligne" +
          "<br>"+user.getLogin()+"Voici votre code d'acc�s pour "+request.getParameter("duree")+" mois de fun !  :" +
          "<br> Code :"+code;
         
      t.run(request,"Souscription � un abonnement de "+request.getParameter("duree")+" mois",content,user.getEmail());
    } catch (MessagingException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.