Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Sending

...

Authenticated

...

Email

...

This

...

is

...

an

...

analysis

...

of

...

the

...

work

...

needed

...

to

...

enable

...

CSF-based

...

apps

...

to

...

send

...

authenticated

...

email.

...

Changes

...

to

...

CSF:

...

1.

...

Configuration

...

of

...

mailSender

...

Spring

...

Bean

...

Configure

...

mailSender

...

bean

...

to

...

use

...

additional

...

properties.

...

Currently

...

only

...

uses

...

"host"

...

=

...

"outgoing.mit.edu".

...

This

...

would

...

be

...

a

...

modification

...

to

...

applicationContext-csf-email-scheduler.xml

...

in

...

the

...

csf-email

...

module.

...

The

...

additional

...

properties

...

are:

{
Code Block
}
<bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
  <property name="host" value="outgoing.mit.edu"/>
  <property name="port" value="587"/>
  <property name="username" value="USERNAME"/>
  <property name="password" value="PASSWORD"/>
  <property name="javaMailProperties">
    <props>
      <prop key="mail.debug">false</prop>
      <prop key="mail.smtp.auth">true</prop>
      <prop key="mail.smtp.starttls.enable">true</prop>
    </props>
  </property>
</bean>

The username, password, port, and possibly host, property values should be externalized to a properties file. We can put these properties in machine.properties - apps should pick this up automatically. Only one copy of this props file per server.

Any app that needs to use this feature would have to upgrade its version of CSF and be retested. Each app would also need to reviewed to make sure it uses "machine.properties" in its property configuration.

2.One Login Per Batch of Email Messages

One question - for a bulk email send, should we authenticate to the server for every single email message in the batch:

Code Block
{code}

The _username_, _password_, _port_, and possibly _host_, property values should be externalized to a properties file. We can put these properties in machine.properties - apps should pick this up automatically. Only one copy of this props file per server.

Any app that needs to use this feature would have to upgrade its version of CSF and be retested. Each app would also need to reviewed to make sure it uses "machine.properties" in its property configuration.

h4. 2.One Login Per Batch of Email Messages

One question - for a bulk email send, should we authenticate to the server for every single email message in the batch:

{code}
DO FOR EACH MAIL MESSAGE
    authenticate to server    send email message
END DO
{code}

or

...

just

...

once

...

for

...

the

...

batch:

{
Code Block
}
authenticate to serverDO FOR EACH MAIL MESSAGE
    send email message
END DO
{code}

My

...

initial

...

test

...

with

...

CSF

...

does

...

the

...

former.

...

WTW

...

seems

...

to

...

do

...

the

...

latter.

...

The

...

latter

...

seems

...

better

...

(only

...

one

...

login

...

per

...

batch

...

rather

...

than

...

one

...

login

...

per

...

message).

...

To

...

do

...

this,

...

the

...

email

...

service

...

needs

...

to

...

change

...

-

...

in

...

fact

...

it

...

may

...

be

...

better

...

to

...

change

...

it

...

anyway.

...

In

...

"batchSend",

...

instead

...

of:

{
Code Block
}
Get list of email events
DO FOR each email event
  create MimeMessagePreparator
  send message using MimeMessagePreparator
  update email event
END DO
{code}

do

...

this:

{
Code Block
}
Get list of email events
DO FOR each email event
  create MimeMessagePreparator and store in list
END DO

send messages using list of MimeMessagePreparators
update email events
{code}

We

...

would

...

use

...

the

...

"batch"

...

API

...

of

...

Spring's

...

JavaMailSender

...

API:

{
Code Block
}
send(MimeMessagePreparator[] mimeMessagePreparators)
{code}

instead

...

of

{
Code Block
}
send(MimeMessagePreparator mimeMessagePreparator)
{code}

h2. Summary

This change would mean:
# Modifications to 

Summary

This change would mean:

  1. Modifications to csf-email

...

  1. (detailed

...

  1. above)

...

  1. Changes

...

  1. to

...

  1. common

...

  1. property

...

  1. files

...

  1. (i.e.

...

  1. machine.properties)

...

  1. on

...

  1. each

...

  1. server

...

  1. that

...

  1. hosts

...

  1. CSF

...

  1. web

...

  1. apps.

...

  1. Build

...

  1. &

...

  1. release

...

  1. of

...

  1. each

...

  1. web

...

  1. app

...

  1. that

...

  1. needs

...

  1. to

...

  1. use

...

  1. this

...

  1. feature.

...

  1. Retest

...

  1. of

...

  1. each

...

  1. rebuilt

...

  1. app.