Access Keys:
Skip to content (Access Key - 0)
Cancel    
Cancel   

Contents

SMTP usability improvements

JIRA Issue

MULE-6113

Motivation

The SMTP transport has some inconsistencies regarding the attributes allowed at the connector and endpoint level.

There are connector specific attributes like host, port, user and password that can only be specified at the endpoint. This means that we need to repeat those attributes for every endpoint we define even when we use the same connector.

There are also inconsistencies between the names of attributes that can be defined both at the connector and endpoint level.

The following list presents the current situation and some changes are proposed next:

Current situation

Connector attributes

  • subject
  • fromAddress
  • ccAddresses
  • bccAddresses
  • replyToAddresses
  • contentType
  • header

Endpoint attributes

  • host
  • port
  • user
  • password
  • to
  • from
  • subject
  • cc
  • bcc
  • replyTo

Proposal

Add the following attributes present in the endpoint to the connector. The attributes are preserved at the endpoint level for backward compatibility:

  • host
  • port
  • user
  • password

Add aliases to the following existing connector attributes to make them consistent with the endpoint ones:

  • fromAddress (add alias from)
  • ccAddresses (add alias cc)
  • bccAddresses (add alias bcc)
  • replyToAddresses (add alias replyTo)

Backward compatibility

All existing configurations will continue working with no changes needed.

Documentation

The SMTP transport page needs to be updated with the new connector attributes and aliases.
The attributes that are discouraged should be removed from the page.

Studio impact

As the change is fully backward compatible, Studio will continue working as it is.

On the other hand, to make the SMTP transport configuration more consistent with other transports like JMS, some changes will be needed.

Like with JMS at the moment of creating a new SMTP endpoint the user will need to create also an SMTP connector or reference an existing one.

The fields host, port, user and password should be removed from the endpoint configuration and displayed in the connector configuration form.

Also the new aliases defined above should be used for the existing connector attributes in preference to the current ones, to make them consistent with the endpoint attributes.