You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Raffaele Gambelli (JIRA)" <ji...@apache.org> on 2019/02/15 11:09:00 UTC
[jira] [Created] (EMAIL-185) [Email] Email.setMailSession doesn't
consider "mail.smts" (note last 's') properties
Raffaele Gambelli created EMAIL-185:
---------------------------------------
Summary: [Email] Email.setMailSession doesn't consider "mail.smts" (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
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)