[
https://jira.duraspace.org/browse/DS-1364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=26758#comment-26758
]
Ivan Masár commented on DS-1364:
--------------------------------
I created a pull request, but I didn't test it:
https://github.com/DSpace/DSpace/pull/122
Apart from what you wrote I also had to do these changes to get it to build:
import org.dspace.core.Email;
public Email()
> 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
> Labels: checker-emailer, configs, email
>
> 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