mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-17 06:53:09 +00:00
[DS-252] Interpolate variables in the Subject: line of email templates as well
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4083 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -316,7 +316,19 @@ public class Email
|
||||
|
||||
message.setSentDate(date);
|
||||
message.setFrom(new InternetAddress(from));
|
||||
message.setSubject(subject);
|
||||
|
||||
// Set the subject of the email (may contain parameters)
|
||||
String fullSubject = MessageFormat.format(subject, args);
|
||||
if (charset != null)
|
||||
{
|
||||
message.setSubject(fullSubject, charset);
|
||||
}
|
||||
else
|
||||
{
|
||||
message.setSubject(fullSubject);
|
||||
}
|
||||
|
||||
// Add attachments
|
||||
if (attachments.isEmpty())
|
||||
{
|
||||
// If a character set has been specified, or a default exists
|
||||
|
Reference in New Issue
Block a user