Scheduled Maintenance: over the next few days, we will update Jira to a newer version.

If you don't know Jira 4.x yet, you might be a little surprised by the UI changes ... :)

Issue Details (XML | Word | Printable)

Key: MAGNOLIA-2420
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Teresa Miyar
Reporter: Marco Collovati
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Magnolia

Allow mail.smtp.starttls.enable property configuration

Created: 09/Oct/08 01:02 PM   Updated: 17/Mar/09 09:51 PM
Component/s: mail
Affects Version/s: None
Fix Version/s: 4.0, 3.6.4, 3.6.5

Time Tracking:
Not Specified

File Attachments: 1. Text File MgnlMailFactory.patch (1 kB)
2. Text File module-mail_MAGNOLIA-2420.patch (4 kB)

Issue Links:
duplicate
 

Patch included: Yes
Labels:
Resolution Date: 23/Jan/09 10:15 AM
Date of First Response: 09/Oct/08 05:04 PM


 Description  « Hide
For some smtp server (gmail) we need to set mail.smtp.starttls.enable property to true when creating a mail Session

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Grégory Joseph added a comment - 09/Oct/08 05:04 PM
Thanks for the patch, will review and apply asap.

Alejandro Scandroli added a comment - 18/Jan/09 06:18 PM
Different patch to solve the same problem.
I have added the socketFactory port, class, & fallback configurations, I have also added the "debug" option and finally I have modified the bootstrap config file.

Grégory Joseph added a comment - 19/Jan/09 01:13 PM
Thanks ! Will have to be modified to be applied on trunk. We'll also have to add an update task to add the new properties in the config.

Hudson CI server added a comment - 19/Jan/09 05:10 PM
Integrated in magnolia_main-trunk #552
add new configurable prperty (starttsl) to smtp ones, applied patch suggested by user

Alejandro Scandroli added a comment - 19/Jan/09 11:49 PM
I just realized that my patch only works on port 465 (SSL) and doesn't support the other gmail port 587 (TLS)
I've mixed up the configuration parameters and they are mutually exclusive.
The code should be something like this:
if (Boolean.valueOf((String) this.mailParameters.get(SMTP_SSL)).booleanValue()) {
            props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
            props.put("mail.smtp.socketFactory.fallback", "false");
        }

        if (Boolean.valueOf((String) this.mailParameters.get(SMTP_TLS)).booleanValue()) {
            props.put("mail.smtp.starttls.enable", "true");
        }

Tomorrow, I will create a new patch (this time against trunk) to fix this.


Grégory Joseph added a comment - 20/Jan/09 09:54 PM
Thanks Alejandro, waiting for this - we'll also apply on the 3.6 branch if you provide the update version.

Hudson CI server added a comment - 21/Jan/09 11:55 AM
Integrated in magnolia_main-trunk #573
tls and ssl are exclusive set only if the property is defined in the configuration

Alejandro Scandroli added a comment - 22/Jan/09 08:28 PM
I saw the changes in the trunk, do you still need the patch? what about the 3.6 branch?

Grégory Joseph added a comment - 23/Jan/09 01:27 AM
If the change in the trunk does what you needed, then I guess we're fine
3.6 should have been patched too - Teresa ?

Hudson CI server added a comment - 23/Jan/09 10:09 AM
Integrated in magnolia_main-3.6-branch #69
merge r21584 from trunk - tls and ssl are exclusive set only if the property is defined in the configuration

Alejandro Scandroli added a comment - 23/Jan/09 11:37 AM
Thank you Gregory, Thank you Teresa!