Package org.springframework.mail.javamail

Examples of org.springframework.mail.javamail.MimeMessagePreparator


   /**
    * Sent a email after system startup.
    */
    public void sendStartUpNotification( final String startupMessage) throws MailSendException{
        MimeMessagePreparator preparator = new MimeMessagePreparator() {
            public void prepare(MimeMessage mimeMessage) throws Exception {
               MimeMessageHelper message = new MimeMessageHelper(mimeMessage);
               message.setTo(EnMePlaceHolderConfigurer
                       .getProperty("setup.email.notification.webmaster"));
               message.setSubject(buildSubject(
View Full Code Here


    /**
     * Send Password Confirmation Email.
     * @param user
     */
    public void sendPasswordConfirmationEmail(final SignUpBean user) {
        MimeMessagePreparator preparator = new MimeMessagePreparator() {
           public void prepare(MimeMessage mimeMessage) throws Exception {
              final MimeMessageHelper message = new MimeMessageHelper(mimeMessage);
              log.debug("sendPasswordConfirmationEmail account to " + user.getEmail());
              message.setTo(user.getEmail());
              message.setSubject(buildSubject(getMessageProperties("email.password.remember.confirmation")));
View Full Code Here

     * @param inviteCode invite code string.
     */
    public void sendConfirmYourAccountEmail(
            final SignUpBean user,
            final String inviteCode) {
        final MimeMessagePreparator preparator = new MimeMessagePreparator() {
           public void prepare(MimeMessage mimeMessage) throws Exception {
              final MimeMessageHelper message = new MimeMessageHelper(mimeMessage);
              log.debug("confirm account to " + user.getEmail());
              message.setTo(user.getEmail());
              message.setSubject(buildSubject(
View Full Code Here

     * Send a welcome notification after validate the account
     * @param user
     * @param message
     */
    public void welcomeNotificationAccount(final UserAccount user) {
        MimeMessagePreparator preparator = new MimeMessagePreparator() {
           public void prepare(MimeMessage mimeMessage) throws Exception {
              MimeMessageHelper message = new MimeMessageHelper(mimeMessage);
              final String _fullName = user.getCompleteName();
              final StringBuffer salute = new StringBuffer(getMessageProperties("mail.message.default.user.presentation",
                      buildCurrentLocale(),
View Full Code Here

     * Send notification status account.
     * @param user
     * @param message
     */
    public void sendNotificationStatusAccount(final SignUpBean user, final String message) {
        MimeMessagePreparator preparator = new MimeMessagePreparator() {
           public void prepare(MimeMessage mimeMessage) throws Exception {
              MimeMessageHelper message = new MimeMessageHelper(mimeMessage);
              message.setTo(user.getEmail());
              message.setSubject(buildSubject("Notificaction status account"));
              message.setFrom(noEmailResponse);
View Full Code Here

            final Map model,
            final String email,
            final String subject,
            final String from,
            final String template) {
        final MimeMessagePreparator preparator = new MimeMessagePreparator() {
           public void prepare(MimeMessage mimeMessage) throws Exception {
              final MimeMessageHelper message = new MimeMessageHelper(mimeMessage);
              message.setTo(email);
              message.setSubject(buildSubject(subject));
              message.setFrom(from);
View Full Code Here

        //System.out.println("Message is:"+message.getPayload());
        final MessageHeaders messageHeaders = message.getHeaders();
        messageHeaders.get(MailHeaders.TO);
        final String content = message.getPayload().toString();

        MimeMessagePreparator preparator = new MimeMessagePreparator() {
            public void prepare(MimeMessage mimeMessage)
                    throws MessagingException {
                MimeMessageHelper message = new MimeMessageHelper(mimeMessage);
                message.setSubject("Some new subject");
                message.setTo(messageHeaders.get(MailHeaders.TO).toString().split(";"));
View Full Code Here

    @Override public void sendUserEmailIdConfirmationMail(final User user) {
        Map model = new HashMap();
        model.put("user", user);

        MimeMessagePreparator preparator = prepareMail(user.getEmail(), props.fromAddress,
                props.subConfirmationEmail, "velocity/confirmation.vm", model);
        this.javaMailSender.send(preparator);
    }
View Full Code Here

    }


    public MimeMessagePreparator prepareMail(final String to, final String from, final String subject,
                                             final String template, final Map model) {
        return new MimeMessagePreparator() {
            public void prepare(MimeMessage mimeMessage) throws Exception {
                MimeMessageHelper message = new MimeMessageHelper(mimeMessage);
                message.setTo(to);
                message.setFrom(from);
                message.setSubject(subject);
View Full Code Here

TOP

Related Classes of org.springframework.mail.javamail.MimeMessagePreparator

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.