[jira] [Created] (EMAIL-151) ImageHtmlEmail uses wrong name for embed() call

2015-03-09 Thread Andreas Kohn (JIRA)
Andreas Kohn created EMAIL-151:
--

 Summary: ImageHtmlEmail uses wrong name for embed() call
 Key: EMAIL-151
 URL: https://issues.apache.org/jira/browse/EMAIL-151
 Project: Commons Email
  Issue Type: Bug
Affects Versions: 1.3.3
Reporter: Andreas Kohn


Found by reading the code: ImageHtmlEmail#replacePattern() asks the 
DataSourceResolver for a DataSource, and if the name of the data source is 
null/empty uses the resource location as name for looking up the CID. 

But, if that didn't work out it tries to embed the data source using the 
original 'null' name instead, which fails with an exception.

Trivial patch attached.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (EMAIL-151) ImageHtmlEmail uses wrong name for embed() call

2015-03-09 Thread Andreas Kohn (JIRA)

 [ 
https://issues.apache.org/jira/browse/EMAIL-151?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andreas Kohn updated EMAIL-151:
---
Attachment: email151-use-calculated-name-for-embed.diff

Workaround: provide a name for the data source.

 ImageHtmlEmail uses wrong name for embed() call
 ---

 Key: EMAIL-151
 URL: https://issues.apache.org/jira/browse/EMAIL-151
 Project: Commons Email
  Issue Type: Bug
Affects Versions: 1.3.3
Reporter: Andreas Kohn
 Attachments: email151-use-calculated-name-for-embed.diff


 Found by reading the code: ImageHtmlEmail#replacePattern() asks the 
 DataSourceResolver for a DataSource, and if the name of the data source is 
 null/empty uses the resource location as name for looking up the CID. 
 But, if that didn't work out it tries to embed the data source using the 
 original 'null' name instead, which fails with an exception.
 Trivial patch attached.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (EMAIL-135) Make DataSourceUrlResolver#createUrl() protected

2013-10-14 Thread Andreas Kohn (JIRA)
Andreas Kohn created EMAIL-135:
--

 Summary: Make DataSourceUrlResolver#createUrl() protected
 Key: EMAIL-135
 URL: https://issues.apache.org/jira/browse/EMAIL-135
 Project: Commons Email
  Issue Type: Improvement
Affects Versions: 1.3.1
Reporter: Andreas Kohn
Priority: Minor


It would be nice if {{#createUrl()}} was protected, so that it can be used in 
derived classes.

In the specific instance where I need that: we're sending emails using Amazon 
Simple Email Service, which requires that attachments not just have a specific 
content type, but also an extension matching that content type.

To implement this requirement I've extended DataSourceUrlResolver, and return a 
URLDataSource that reports the original file name with the extension suitably 
enforced.





--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Updated] (EMAIL-135) Make DataSourceUrlResolver#createUrl() protected

2013-10-14 Thread Andreas Kohn (JIRA)

 [ 
https://issues.apache.org/jira/browse/EMAIL-135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andreas Kohn updated EMAIL-135:
---

Attachment: email-135-datasourceurlresolver-createUrl-protected.diff

Trivial patch.

 Make DataSourceUrlResolver#createUrl() protected
 

 Key: EMAIL-135
 URL: https://issues.apache.org/jira/browse/EMAIL-135
 Project: Commons Email
  Issue Type: Improvement
Affects Versions: 1.3.1
Reporter: Andreas Kohn
Priority: Minor
 Attachments: email-135-datasourceurlresolver-createUrl-protected.diff


 It would be nice if {{#createUrl()}} was protected, so that it can be used in 
 derived classes.
 In the specific instance where I need that: we're sending emails using Amazon 
 Simple Email Service, which requires that attachments not just have a 
 specific content type, but also an extension matching that content type.
 To implement this requirement I've extended DataSourceUrlResolver, and return 
 a URLDataSource that reports the original file name with the extension 
 suitably enforced.



--
This message was sent by Atlassian JIRA
(v6.1#6144)