You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Michael Osipov (JIRA)" <ji...@apache.org> on 2019/02/16 19:55:00 UTC

[jira] [Updated] (EMAIL-185) [Email] Email.setMailSession doesn't consider "mail.smtps" (note last 's') properties

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

Michael Osipov updated EMAIL-185:
---------------------------------
    Summary: [Email] Email.setMailSession doesn't consider "mail.smtps" (note last 's') properties  (was: [Email] Email.setMailSession doesn't consider "mail.smts" (note last 's') properties)

> [Email] Email.setMailSession doesn't consider "mail.smtps" (note last 's') properties
> -------------------------------------------------------------------------------------
>
>                 Key: EMAIL-185
>                 URL: https://issues.apache.org/jira/browse/EMAIL-185
>             Project: Commons Email
>          Issue Type: Bug
>    Affects Versions: 1.5
>            Reporter: Raffaele Gambelli
>            Priority: Major
>
> From [here|https://javaee.github.io/javamail/docs/api/com/sun/mail/smtp/package-summary.html] it's written this:
> {quote}Note that if you're using the "smtps" protocol to access SMTP over SSL, all the properties would be named "mail.smtps.*".{quote}
> I'm using Session with many mail.smtps.* properties, but when setting my session to _Email_ class, I saw they aren't read because of _Email_ expects properties are only named mail.smtp and not consider mail.smtps...am I wrong?
> {code:java}
> public void setMailSession(final Session aSession)
>     {
>         EmailUtils.notNull(aSession, "no mail session supplied");
>         final Properties sessionProperties = aSession.getProperties();
>         final String auth = sessionProperties.getProperty(EmailConstants.MAIL_SMTP_AUTH);
>         if ("true".equalsIgnoreCase(auth))
>         {
>             final String userName = sessionProperties.getProperty(EmailConstants.MAIL_SMTP_USER);
>             final String password = sessionProperties.getProperty(EmailConstants.MAIL_SMTP_PASSWORD);
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)