Package org.dspace.core

Examples of org.dspace.core.Email.addAttachment()


            email.addRecipient(eperson.getEmail());
            email.addArgument(ConfigurationManager.getProperty("dspace.url")
                    + "/rp/tools/stats/subscription/unsubscribe?clear=all");
            email.addArgument(ConfigurationManager.getProperty("dspace.url")
                    + "/rp/tools/stats/subscription/list.htm");
            email.addAttachment(file, "stat-" + sfreq + "-update.xls");
            email.send();
            file.delete();
        }
        log.info(LogManager.getHeader(context, "sent_statsubscription",
                "eperson_id=" + eperson.getID() + ", freq=" + sfreq));
View Full Code Here


        {
            String hostname = ConfigurationManager.getProperty("dspace.hostname");
            Email email = new Email();
            email.setSubject("Checksum checker Report - " + numberOfBitstreams + " Bitstreams found with POSSIBLE issues on " + hostname);
            email.setContent("report is attached ...");
            email.addAttachment(attachment, "checksum_checker_report.txt");
            email.addRecipient(ConfigurationManager.getProperty("mail.admin"));
            email.send();
        }
    }
View Full Code Here

            Bundle[] bundles = item.getBundles("ORIGINAL");
            for (int i = 0; i < bundles.length; i++){
                Bitstream[] bitstreams = bundles[i].getBitstreams();
                for (int k = 0; k < bitstreams.length; k++){
                    if (!bitstreams[k].getFormat().isInternal() /*&& RequestItemManager.isRestricted(context, bitstreams[k])*/){
                        email.addAttachment(BitstreamStorageManager.retrieve(context, bitstreams[k].getID()), bitstreams[k].getName(), bitstreams[k].getFormat().getMIMEType());
                    }
                }
            }
        } else {
            Bitstream bit = Bitstream.find(context,requestItem.getBitstreamId());
View Full Code Here

                    }
                }
            }
        } else {
            Bitstream bit = Bitstream.find(context,requestItem.getBitstreamId());
            email.addAttachment(BitstreamStorageManager.retrieve(context, requestItem.getBitstreamId()), bit.getName(), bit.getFormat().getMIMEType());
        }    
       
        email.send();

        requestItem.setDecision_date(new Date());
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.