Ariel J. Lira created DS-1364:
---------------------------------
Summary: checker-emailer ignores advanced mail configuration
Key: DS-1364
URL: https://jira.duraspace.org/browse/DS-1364
Project: DSpace
Issue Type: Bug
Components: DSpace API
Affects Versions: 1.8.2, 3.0
Reporter: Ariel J. Lira
checker-emailer task silently apparently ignores advanced mail configuration
defined in dspace.cfg and makes imposible to send email-reports using tls,
ports other than 25, or authentication. Some settings being ignored are:
- mail.server.port
- mail.extraproperties
- mail.charset
- mail.server.disabled
The problem is located in method
org/dspace/checker/DailyReportEmailer.sendReport() -->
https://github.com/DSpace/DSpace/blob/master/dspace-api/src/main/java/org/dspace/checker/DailyReportEmailer.java#L78
Email class could be easily reused to solve this issue by doing the folowing 2
changes:
1. replace sendReport method:
public void sendReport(File attachment, int numberOfBitstreams)
throws IOException, javax.mail.MessagingException
{
Email email = new Email();
email.setSubject("Checksum checker Report - " + numberOfBitstreams + "
Bitstreams found with POSSIBLE issues");
email.setContent("report is attached ...");
email.addAttachment(attachment, "checksum_checker_report.txt");
email.addRecipient(ConfigurationManager.getProperty("mail.admin"));
email.send();
}
2 In org.dspace.core.Email, change visibility to public of these methods
- Email()
- void setContent(String cnt)
- void setSubject(String s)
Regards,
Ariel
http://sedici.unlp.edu.ar
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel