|
[
Permlink
| « Hide
]
Anton Mazkovoi [Atlassian] added a comment - 07/Nov/06 03:53 PM
Any idea how to do that? Do we need to manually read all mail properties from command line and then pass them through to Java Mail? I hoped Java Mail was smart enough to do that itself.
The JavaMail session takes a Properties object. We give it one populated just with atlassian-mail.properties content. Instead we should do:
Properties p = new Properties(System.getProperties()); Properties newProps = new Properties(..."atlassian-mail.properties"...); foreach (newProp in newProps) { p.setProperty(newProp.key, newProp,value); } so that atlassian-mail.properties overrides the defaults, but the defaults still apply. The code is all in atlassian-mail, com/atlassian/mail/config/PropertiesLoader.java. Actually this problem applies to JIRA and Confluence.
The code sniplet will make the properties inside the file override the system properties which is not what we want (as far as I can tell).
Need to either reverse the loop to go over system properties, or check for existence of the property in system properties before overriding it from the file properties, and only override if the system property is not set. Updated PropertiesLoader to also put all the sytem properties, such that properties from the mail config file get overriden.
Hi,
I'm using Jira 3.10.1 version. Regards, Abhishek,
I am not sure what changes you are referring to. If you have a problem with getting JIRA to send or receive e-mail, please create a support request in our support system: Cheers, |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||