Package eu.planets_project.ifr.core.common.mail

Examples of eu.planets_project.ifr.core.common.mail.PlanetsMailMessage.send()


    // Send them a message.
    PlanetsMailMessage mailer = new PlanetsMailMessage();
    mailer.setSubject(subject);
    mailer.setBody(body);
    mailer.addRecipient(user.getEmail());
    mailer.send();
  }

  /**
   * {@inheritDoc}
   * @see eu.planets_project.ifr.core.security.api.services.UserManager#assignRoleToUser(eu.planets_project.ifr.core.security.api.model.User, java.lang.String)
View Full Code Here


        }
        message.setSubject(velocityContext.get("subject").toString());
        message.setBody(result.toString());
       
        try {
            message.send();
        } catch( Exception e ) {
            log.error("An error occured while trying to send an email to "+user.getFullName()+"! :: "+e);
            e.printStackTrace();
        }
    }
View Full Code Here

    PlanetsMailMessage mailer = new PlanetsMailMessage();
                mailer.setSubject(subject);
                mailer.setBody(body);
                mailer.addRecipient(user.getEmail());
                mailer.send();

    return "success";
  }

  public String getValidationResult()
View Full Code Here

            PlanetsMailMessage mailer = new PlanetsMailMessage();
            //mailer.setSender("noreply@planets-project.eu");
            mailer.setSubject(this.emailTestSubject);
            mailer.setBody(this.emailTestMessage);
            mailer.addRecipient(this.emailTestAddress);
            mailer.send();
            this.setTestEmailResult("You email appears to have been successfully sent. Please check the logs.");
            log.info("Email sent successfully.");
        } catch( Exception e ) {
            this.setTestEmailResult("Sending email failed, with exception: "+e);
            log.info("Email sending failed.");
View Full Code Here

            PlanetsMailMessage mailer = new PlanetsMailMessage();
            mailer.setSender("noreply@planets-project.eu");
            mailer.setSubject("Testbed Experiment Deleted");
            mailer.setBody("Experiment "+exp.getExperimentSetup().getBasicProperties().getExperimentName()+" approved.");
            mailer.addRecipient("Helpdesktb@planets-project.eu");
            mailer.send();
            return "success";
        }
       
     
        public String deleteExperimentAction()
View Full Code Here

          mailer.setSender("noreply@planets-project.eu");
          mailer.setSubject("Testbed Experiment Deleted");
          mailer.setBody("Experiment "+expBean.getEname()+" deleted.");
          mailer.addRecipient(expBean.getEcontactemail());
          mailer.addCcRecipient("Helpdesktb@planets-project.eu");
          mailer.send();

        // go back to 'my experiments' page
        return "expDeleted";
      }
     
View Full Code Here

                  mailer.setSubject("Experiment deletion request: "+expName);
                  mailer.setBody(body);

                  User user = UserBean.getUser("admin");
                  mailer.addRecipient(user.getFullName() + "<" + user.getEmail() + ">");
                  mailer.send();
                 
                  //send email to user, explaining that they have *requested* deletion
                  body = "Experiment deletion request sent for experiment:\r\n";
                body += expName+"\r\n";
                body += "\r\nThe administrator will verify your request and delete the experiment if appropriate.";
View Full Code Here

                  mailer.setSubject("Experiment deletion request: "+expName);
                  mailer.setBody(body);

                  user = UserBean.getUser(experimenter);
                  mailer.addRecipient(user.getFullName() + "<" + user.getEmail() + ">");
                  mailer.send();
                 
                  log.info("Deletion request email sent successfully.");
              }
            } catch( Exception e ) {
                log.info("Deletion email sending failed. Details: "+ e);
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.