Use this information to configure email services, including inbound and outbound email, subscriptions, and email clients.
- Configuring inbound and outbound email
The email subsystem allows you to configure the outbound and inbound SMTP email settings to interact with Alfresco Content Services. - Configuring the Activities Feed
Activities Feed emails are sent from Alfresco Content Services to all users, summarizing the activities they see in their My Activities dashlet. Users will not see these email unless the Activities Feed is enabled. Emails include activities in all sites they are a member of, and by people they are following. In the Admin Console, you can set the frequency with which these emails are sent, the maximum number of activities they contain, and the maximum age of the activities. - Enabling the Subscription Service
Subscriptions in the Admin Console allows you to enable or disable the Follow feature for users to follow each other in Alfresco Share. Users can keep track of other users activities by choosing to follow them. - Configuring the email client with IMAP
IMAP protocol support allows email applications that support IMAP (including Outlook, Apple Mail, Thunderbird, and so on) to connect to and interact with Alfresco Content Services repositories.
Configuring inbound and outbound email
The email subsystem allows you to configure the outbound and inbound SMTP email settings to interact with Alfresco Content Services.
There are two methods of running email server:
- Running the email server process in the same JVM context as the repository
-
Running the email server remotely and communicate with the repository using Remote Method Invocation (RMI)
- Managing inbound emails
Set these inbound email properties in the Admin Console to activate sending and receiving site invites, and also for receiving activity notification emails. - Inbound SMTP configuration properties
The Inbound SMTP email subsystem type allows you to configure the behavior of the email server and service. - Managing outbound emails
Set these outbound email properties in the Admin Console to manage all emails sent from Alfresco Content Services to users such as site invitations, activity notifications, and workflow tasks. - Outbound SMTP configuration properties
The following properties can be configured for the Outbound SMTP subsystem type. - Handling messages by target node type
Default behaviors for incoming email to different types of referenced nodes. - Groups and permissions for email
An email arriving at the Alfresco Content Services email server is unauthenticated. An authentication group,EMAIL_CONTRIBUTORS
, must exist to allow permissions to be handled at a high level by the administrator.
Managing inbound emails
Set these inbound email properties in the Admin Console to activate sending and receiving site invites, and also for receiving activity notification emails.
-
Open the Admin Console.
-
In the Email Services section, click Inbound Email.
You see the Inbound Email page.
-
Set the email properties:
|Inbound Email property|Example setting|What is it?| |———————-|—————|———–| |Enabled|No|Use check box to enable or disable the inbound email service. By default, it is not enabled.| |Unknown User|anonymous|This is the user name to authenticate as when the sender address is not recognized.| |Allowed Senders|.|To allow senders, enter a comma-separated list of email REGEX patterns of allowed senders. If there are any values in the list, then all sender email addresses must match. For example:.\@alfresco.com, .\@alfresco.org.| |Overwrite Duplicates|Yes|By default, duplicate messages to a folder will overwrite each other. Deselect this check box to keep duplicate messages and apply a unique number.| |Maximum Server Connections|3|This provides the maximum number of connections allowed in order to control the performance of the system. To prioritize the email subsystem higher, increase this number. The default setting is 3.| |SMTP Authentication Enabled|No|Use this check box to enable or disable the authentication of inbound email against the repository.| |Email Server Port|25|This is the default port number for the email server.| |Email Server Domain|alfresco.com|This is the default domain for the email server.| |Blocked Senders| |To block senders, enter a comma-separated list of email REGEX patterns, for example: .\@hotmail.com, .*\@googlemail.com. If the sender email address matches a listed value, then the message will be rejected.| |Email Authentication Group|EMAIL_CONTRIBUTORS|This is the name of the group in which users must be a member to add content to the repository by email. The default group is EMAIL_CONTRIBUTORS.| |Transport Layer Security (TLS)|Enabled|This enables the TLS protocol, which upgrades a plain text connection to an encrypted TLS or SSL connection instead of using a separate port for encrypted communication. Select the TLS support setting: - Disabled: TLS support is disabled
- Hidden: On the EHLO command, server support for TLS is hidden, though TLS will still be accepted if the client uses it
- Enabled: On the EHLO command, server support for TLS is announced
- Required: TLS authentication is required |
-
Click Save to apply the changes you have made to the properties.
If you do not want to save the changes, click Cancel.
Inbound SMTP configuration properties
The Inbound SMTP email subsystem type allows you to configure the behavior of the email server and service.
The following properties can be set for Inbound SMTP email in the alfresco-global.properties
file.
-
email.inbound.unknownUser=anonymous
Specifies the user name to authenticate as when the sender address is not recognized.
-
email.inbound.enabled=true
Enables or disables the inbound email service. The service could be used by processes other than the email server (for example, direct RMI access), so this flag is independent of the email service.
-
email.server.enabled=true
Enables the email server.
-
email.server.port=25
Specifies the port number for the email server.
-
email.server.domain=alfresco.com
Specifies the name or the IP address of the network to bind the email server to.
-
email.server.allowed.senders=.*
Provides a comma-separated list of email REGEX patterns of allowed senders. If there are any values in the list, then all sender email addresses must match. For example: .\@alfresco.com, .\@alfresco.org.
-
email.server.blocked.senders=
Provides a comma-separated list of email REGEX patterns of blocked senders. If the sender email address matches this, then the message will be rejected. For example: .\@hotmail.com, .\@googlemail.com.
Managing outbound emails
Set these outbound email properties in the Admin Console to manage all emails sent from Alfresco Content Services to users such as site invitations, activity notifications, and workflow tasks.
-
Open the Admin Console.
-
In the Email Services section, click Outbound Email.
You see the Outbound Email page.
-
Set the email properties:
Outbound Email property Example setting What is it? Hostname smtp.example.com This is the name of the SMTP(S) host server. Encoding UTF-8 This is the email encoding type. The default is UTF-8. Editable Sender Address This check box enables the From field in outbound emails to be edited to differ from the Default Sender’s Address. When you deselect this check box, the Default Sender’s Address is always used. You should deselect this option if your email server security settings require the From field to match the user name used for email server authentication. Email Server Port 25 This is the default port number for the email server. Default Sender’s Address alfresco@demo.alfresco.org The default address that is used in the From field of outbound emails if no alternative is available. Email Protocol SMTP Select a protocol from the list. This is the protocol that will be used when sending email. Username anonymous The account user name that connects to the SMTP server. The user name and password are only required if your server requires them for authentication. Password The account user password. -
Click Save to apply the changes you have made to the properties.
If you do not want to save the changes, click Cancel.
Outbound SMTP configuration properties
The following properties can be configured for the Outbound SMTP subsystem type.
Note: You must set the Outbound email configuration for Alfresco Share invitations to work correctly. If you do not set the email configuration, when you invite a user to a site, the user will not receive the assigned task notification.
The email service is exposed as a spring bean called mailService, which is contained in the Outbound SMTP subsystem.
Configure the repository to send emails to an external SMTP server by overriding the default settings. Set the email property overrides in the alfresco-global.properties
file.
-
mail.host=yourmailhost.com
Specifies the host name of the SMTP host, that is, the host name or IP address of the server to which email should be sent.
-
mail.port
Specifies the port number on which the SMTP service runs (the default is 25). By convention, the TCP port number 25 is reserved for SMTP, but this can be changed by your email administrator.
-
mail.username
Specifies the user name of the account that connects to the smtp server.
-
mail.password
Specifies the password for the user name used in
mail.username
. -
mail.encoding
Specifies UTF-8 encoding for email. Set this value to UTF-8 or similar if encoding of email messages is required.
-
mail.from.default
Specifies the email address from which email notifications are sent. This setting is for emails that are not triggered by a user, for example, feed notification emails. If the current user does not have an email address, this property is used for the
from
field by theMailActionExecutor
. -
mail.from.enabled
If this property is set to false, then the value set in
mail.from.default
is always used. If this property is set to true, then thefrom
field may be changed. This property may be required if your email server security settings insist on matching thefrom
field with the authentication details. -
mail.protocol
Specifies which protocol to use for sending email. The value can be either smtp or smtps.
-
mail.header
Optionally specifies the content transfer encoding for the message. If specified the Content-Transfer-Encoding is set to the value you specify.
The following properties are for SMTP.
-
mail.smtp.auth
Specifies if authentication is required or not. Specifies the use of SMTPS authentication. If true, attempt to authenticate the user using the
AUTH
command. Defaults to false. -
mail.smtp.timeout
Specifies the timeout in milliseconds for SMTP.
-
mail.smtp.starttls.enable
Specifies if the transport layer security needs to be enabled or not. Specifies the use of
STARTTLS
command. If true, enables the use of theSTARTTLS
command to switch the connection to a TLS-protected connection before issuing any login commands. Defaults to false. -
mail.smtp.debug
Specifies if debugging SMTP is required or not.
The following properties are for SMTPS.
-
mail.smtps.starttls.enable
Specifies if the transport layer security for smtps needs to be enabled or not.
-
mail.smtps.auth
Specifies if authentication for smtps is required or not.
The following properties can be set to define a test message when the subsystem starts.
-
mail.testmessage.send
Defines whether or not to send a test message.
-
mail.testmessage.to
Specifies the recipient of the test message.
-
mail.testmessage.subject
Specifies the message subject of the test message.
-
mail.testmessage.text
Specifies the message body of the test message.
The following property is for setting the email site invitation behavior.
-
notification.email.siteinvite
You must set the outbound email configuration for Share invitations to work correctly. This property allows you to control whether or not emails are sent out for site invites. If you have not configured the outbound email properties, set this property to false.
The following examples show which properties to set for two different email clients. Add these properties to the alfresco-global.properties
file.
The following example shows the properties that you need to set to configure Gmail.
# Sample Gmail settings {#sample-gmail-settings}
mail.host=smtp.gmail.com
mail.port=465
mail.username=user@gmail.com
mail.password=password
mail.protocol=smtps
mail.smtps.starttls.enable=true
mail.smtps.auth=true
The following example shows the properties that you need to set to configure Zimbra.
# Sample Zimbra settings {#sample-zimbra-settings}
Not authenticated.
mail.host=zimbra.<your company>
mail.port=25
mail.username=anonymous
mail.password=
# Set this value to UTF-8 or similar for encoding of email messages as required
mail.encoding=UTF-8
# Set this value to 7bit or similar for Asian encoding of email headers as required
mail.header=
mail.from.default=<default from address>
mail.smtp.auth=false
mail.smtp.timeout=30000
Handling messages by target node type
Default behaviors for incoming email to different types of referenced nodes.
You can modify or extend the default behaviors by adding in custom handlers.
-
Folder(Space)
Content added with emailed aspect.
-
Forum(Discussion)
Content specialized to Post with emailed aspect; if email subject matches a topic, then add to topic, otherwise create new topic based on subject.
-
Topic(Post)
Content specialized to Post with emailed aspect; if referenced node is a Post, add to Post’s parent Topic.
-
Document(Content)
If discussion exists, same as for forums, otherwise add discussion with email as initial topic and post.
Groups and permissions for email
An email arriving at the Alfresco Content Services email server is unauthenticated. An authentication group, EMAIL_CONTRIBUTORS
, must exist to allow permissions to be handled at a high level by the administrator.
When an email comes into the system, the only identification is the sender’s email address. The user is looked up based on the email address.
- If a matching user is not found, then the current user is assumed to be unknown, if unknown exists
- If unknown does not exist, then the email is rejected as authentication will not be possible
- If the user selected is not part of email contributor’s group, then the email is rejected
The current request’s user is set and all subsequent processes are run as the authenticated user. If any type of authentication error is generated, then the email is rejected. The authentication will also imply that the authenticated user may not have visibility of the target node, in which case the email is also rejected. Effectively, this means that the target recipient of the email does not exist, at least not for the sender.
The current default server configuration creates the EMAIL_CONTRIBUTORS
group and adds the admin
user to this group.
Configuring the Activities Feed
Activities Feed emails are sent from Alfresco Content Services to all users, summarizing the activities they see in their My Activities dashlet. Users will not see these email unless the Activities Feed is enabled. Emails include activities in all sites they are a member of, and by people they are following. In the Admin Console, you can set the frequency with which these emails are sent, the maximum number of activities they contain, and the maximum age of the activities.
-
Open the Admin Console.
-
In the Repository Services section, click Activities Feed.
You see the Activities Feed page.
-
Set the activities properties:
Activities Feed property Example setting What is it? Activity Feed Enabled Yes This enables or disables activity notifications to users using email. Frequency CRON Expression 0 0 0 * * ? This specifies a cron expression which defines the frequency with which users will receive Activities Feed emails. Emails are only sent if there are new activities since the last email. By default this is every 24 hours at midnight. Maximum Number 200 The maximum number of activities that are reported on in the Activities dashlets and Activities Feed emails. Maximum Age (mins) 44640 This is the maximum age of the activities shown in the Activities Feed emails. Activities that are older than the maximum age are not shown in the Activities dashlet. The default setting is 44640 (a 31-day month). -
Click Save to apply the changes you have made to the properties.
If you do not want to save the changes, click Cancel.
Enabling the Subscription Service
Subscriptions in the Admin Console allows you to enable or disable the Follow feature for users to follow each other in Alfresco Share. Users can keep track of other users activities by choosing to follow them.
When users are being followed, the person(s) following them receive activity notifications. The Subscription Service is the underlying service used to manage and generate activity notifications. You can use this page to enable/disable the Subscription Service and the follow feature on a system wide basis.
-
Open the Admin Console.
-
In the Repository Services section, click Subscription Service.
You see the Subscription Service page.
-
Use the Enabled check box to choose whether to enable or disable the Follow feature for all users:
- Select the check box to enable subscriptions
- Deselect the check box to disable subscriptions The Enabled check box is selected by default. This allows users to follow other users and then filter activities according to who they are following. If you disable subscriptions, users will not be able to follow users and they will not see the activities. For example, on the My Profile page, the I’m Following and Following Me options are not visible.
-
Click Save to apply the changes you have made to the properties.
If you do not want to save the changes, click Cancel.
Configuring the email client with IMAP
IMAP protocol support allows email applications that support IMAP (including Outlook, Apple Mail, Thunderbird, and so on) to connect to and interact with Alfresco Content Services repositories.
Each user has their own set of mailboxes stored in Alfresco Content Services, for example, they have their own INBOX. Users can manage emails in Alfresco Content Services, and the workflow, transformation, and permissions features are available.
In addition, sites can be nominated as IMAP Favorites. This means that the site contents show as a set of IMAP folders. Non-favorite sites are not shown.
A metadata extractor for IMAP emails (RFC822 messages) can extract values from the contents of the email message and store the values as properties.
Note: Be careful when deciding what mount points you provide. When an IMAP client mounts a mount point, it issues a
LSUB "" *
command. This retrieves the entire tree of folders below the mount point.
For information about working with Alfresco Content Services and Microsoft Outlook, see Installing and configuring Alfresco Outlook Integration.
- Enabling the IMAP protocol using alfresco-global.properties
The IMAP protocol server is disabled by default. You need to enable the IMAP protocol server to start interaction between the email client and the repository. - Enabling the IMAP Service using the Admin Console
The IMAP server allows email applications that support IMAP to connect to and interact with repositories directly from the mail client. You ca use IMAP Service in the Admin Console to configure IMAP, instead of editing youralfresco-global.properties
file. - IMAP subsystem properties
The following properties can be configured for the IMAP subsystem. - IMAP mount points
IMAP mount points are used to control which folders are available using IMAP and the mode in which they are accessed. Modes are used to define the type of interaction available. - Virtual view email format
The virtualized view uses presentation templates to generate the mail body and display document metadata, action links (for download, view, webdav, folder) and Start Workflow form (HTML view only). - Marking sites as IMAP favorites
To have access to Alfresco Share sites using IMAP, the site(s) need to be added to your list of sites using Share IMAP Favorites.
Enabling the IMAP protocol using alfresco-global.properties
The IMAP protocol server is disabled by default. You need to enable the IMAP protocol server to start interaction between the email client and the repository.
-
Open the
alfresco-global.properties
file. -
Enable the IMAP server by setting the following property to
true
:imap.server.enabled=true
-
Set the IMAP server to listen on a specific interface using the following property:
imap.server.host=x.x.x.x
Where
x.x.x.x
is the IP address (or corresponding DNS address) of your external IP interface. Do not use127.0.0.1
orlocalhost
.By default, the IMAP server listens on all interfaces on the default IMAP port of 143. You can set this property to use an alternative port number, for example 144.
-
Restart the Alfresco Content Services server.
Once the server has restarted, the new configuration will take effect. Since the IMAP server has only one instance, make your configuration changes to the
Enabling the IMAP Service using the Admin Console
The IMAP server allows email applications that support IMAP to connect to and interact with repositories directly from the mail client. You ca use IMAP Service in the Admin Console to configure IMAP, instead of editing your alfresco-global.properties
file.
-
Open the Admin Console.
-
In the Virtual File Systems section, click IMAP Service.
You see the IMAP Service page.
-
Set the IMAP Service properties:
IMAP Service property Example setting What is it? IMAP Server Enabled No This enables or disables the IMAP server. Hostname 0.0.0.0 This specifies the host or IP address to which the IMAP service will bind. Mail TO Default alfresco@demo.alfresco.org This specifies the default TO field that will be used when the TO field is not available, for example, when displaying documents. Mail FROM Default alfresco@demo.alfresco.org This specifies the default FROM field that will be used when the FROM field is not available, for example, when displaying documents. -
Set the IMAP Protocol properties:
IMAP Protocol property Example setting What is it? Enable IMAP Yes This enables or disables the IMAP service. Port 143 This specifies the port number on which this service will listen. This is usually 143 but can be changed to an alternative number. -
Set the IMAPS Protocol properties:
IMAPS Protocol property Example setting What is it? Enable IMAP Yes This enables or disables the IMAPS service. Port 993 This specifies the port number on which this service will listen. This is usually 993 but can be changed to an alternative number. -
Click Save to apply the changes you have made to the properties.
If you do not want to save the changes, click Cancel.
IMAP subsystem properties
The following properties can be configured for the IMAP subsystem.
Enabling the IMAP protocol
The following properties control the IMAP subsystem:
-
imap.server.enabled=true
Enables or disables the IMAP subsystem.
-
imap.server.port=143
IMAP has a reserved port number of 143. You can change it using this property.
-
**imap.server.host=
** Replace this value with the IP address (or corresponding DNS name) of your external IP interface.
Configure the following properties of the sysAdmin subsystem:
-
alfresco.protocol=http
The protocol component of the Alfresco Content Services web application URL, for example,
http
. -
alfresco.host=$ {localname}
The host name of the Alfresco Content Services URL, which is externally resolved. Use
${localname}
for the locally-configured host name. -
alfresco.port=8080
The port number of the Alfresco Content Services URL, which is externally resolved. For example,
8080
-
alfresco.context=alfresco
The context path component of the Alfresco Content Services URL. Typically this is
alfresco
.
To configure the IMAP Home space, which is used to store user mailboxes in ARCHIVE mode, in particular the user’s INBOX, use the following properties:
-
imap.config.home.store=${spaces.store}
Specifies the default location for the IMAP mount point. For example,
${spaces.store}
. -
imap.config.home.rootPath=/${spaces.company_home.childname}
Specifies the default location for the IMAP mount point. For example,
/${spaces.company_home.childname}
.This property may also be configured using an
XPath
query syntax.imap.config.home.rootPath=/app:company_home
To add your own folder to this path, add the name of your folder path using the data model names. For example:
/app:company_home/cm:Houses
If your folder has a space in the name, include
_x0020_
where the space should be. For example:/app:company_home/cm:Home_x0020_Town
Stop and start the IMAP subsystem for the changes to take effect.
-
imap.config.home.folderPath=cm:Imap Home
Specifies the QName of the default location for the IMAP mount point. For example,
cm:Imap Home
.
Enabling IMAPS
IMAPS is a secure IMAP that is encrypted using SSL. IMAPS is assigned to port number 993 by default. When you have enabled the IMAP subsystem, you must configure the default Java keystore, and then enable IMAPS.
To configure the default Java keystore, use the following properties:
-
javax.net.ssl.keyStore=mySrvKeystore
Specifies the keystore to be used
-
javax.net.ssl.keyStorePassword=123456
Specifies the keystore password
To enable IMAPS, use the following properties:
-
imap.server.imaps.enabled=true
Specifies that IMAPS is enabled
-
imap.server.imaps.port=993
Specifies the IMAPS port number
Extracting attachments
An IMAP message can contain a message and a set of attachments, and the IMAP server can split the attachments into separate content nodes. Use this property with caution if you have a large repository. See Troubleshooting IMAP for more information.
-
imap.server.attachments.extraction.enabled=true
Defines whether or not attachments are extracted.
IMAP mount points
IMAP mount points are used to control which folders are available using IMAP and the mode in which they are accessed. Modes are used to define the type of interaction available.
The IMAP integration offers the following access modes:
-
Archive
Allows emails to be written to and read from Alfresco Content Services by the IMAP client by drag and drop, copy/paste, and so on, from the email client.
-
Virtual
Documents managed by Alfresco Content Services can be viewed as emails from the IMAP client. Documents are shown as virtual emails with the ability to view metadata and trigger actions on the document, using links included in the email body.
-
Mixed
A combination of both archive and virtual modes, that is, both document access and email management are available.
Add the IMAP composite property, imap.config.server.mountPoints
along with the names of your IMAP mount points to the alfresco-global.properties
file. For each mount point specify the following settings:
beanName
store
rootPath
mode
By default, a single mount point called AlfrescoIMAP
is defined in the MIXED
mode for Company Home and you can change it or add more mount points.
imap.config.server.mountPoints=AlfrescoIMAP
imap.config.server.mountPoints.default.mountPointName=IMAP
imap.config.server.mountPoints.default.modeName=ARCHIVE
imap.config.server.mountPoints.default.store=${spaces.store}
imap.config.server.mountPoints.default.rootPath=/${spaces.company_home.childname}
imap.config.server.mountPoints.value.AlfrescoIMAP.mountPointName=Alfresco IMAP
imap.config.server.mountPoints.value.AlfrescoIMAP.modeName=MIXED
In JMX dump, the same presentation looks like this:
** Object Name Alfresco:Type=Configuration,Category=imap,id1=default,id2=imap.config.server.mountPoints,id3=AlfrescoIMAP
** Object Type imap$default$imap.config.server.mountPoints$AlfrescoIMAP
folderPath
mode MIXED
modeName MIXED
mountPointName Alfresco IMAP
rootPath /app:company_home
store workspace://SpacesStore
storeRef workspace://SpacesStore
Note: Be careful when deciding what mount points you provide. When an IMAP client mounts a mount point, it issues a
LSUB "" *
command. This retrieves the entire tree of folders below the mount point.
Virtual view email format
The virtualized view uses presentation templates to generate the mail body and display document metadata, action links (for download, view, webdav, folder) and Start Workflow form (HTML view only).
The templates are stored in the repository in Company Home > Data Dictionary > Imap Configs > Templates. Separate templates are available to generate either a HTML or plain text body, based on the format request by the email client. The templates can be customized to change the metadata and actions available in the email body.
Marking sites as IMAP favorites
To have access to Alfresco Share sites using IMAP, the site(s) need to be added to your list of sites using Share IMAP Favorites.
-
Select IMAP Favorites in the Share My Sites dashlet on your My Dashboard page:
-
Refresh your IMAP view to see the new sites.
You can see the site added to the IMAP Sites folder.
Note: If the folders do not appear in your email client, you should confirm that:
- The folder is in a site marked as an IMAP favorite.
- Your email client is showing all folders, and not just the folders that you have subscribed to.
- In your email client, look for a property like Reload IMAP folders.
- In your email client, clear your IMAP cache.
Configuring email templates using v1 REST APIs
Use this information to configure customized email templates for your registered applications using the v1 REST APIs.
Alfresco Content Services provides a number of new properties for configuring customized email templates when using the v1 REST APIs. Once you have developed your custom application, add the required properties in the global properties file (alfresco-global.properties) to register your application. In this file you can also set the path to each email template and any linked assets (such as images and company logo) to use your own branding.
The shared-links
and request-password-reset
APIs provide a way to send email notifications. To view these APIs, navigate to https://api-explorer.alfresco.com/api-explorer/#!/shared-links/emailSharedLink and https://api-explorer.alfresco.com/api-explorer/#!/people/requestPasswordReset in your web browser. One of the mandatory properties in the request body of these APIs, client
, sets the name of your registered client application. Registering a client means you can create a unique email template for each client, and configure the required email template and assets using different properties.
The client registration is based on a predefined naming convention loaded from properties files. The naming convention must conform to the format:
repo.client-app.<client-name>.<propertyName>
Note: The client name (
<client-name>
) and property name (<propertyName>
) must not contain a dot (‘.’).
An example implementation is provided in this release where Alfresco Share is registered as the default client for the shared-links
and request-password-reset
APIs. These properties are defined in alfresco/client/config/repo-clients-apps.properties but you can override them in alfresco-global.properties
:
repo.client-app.share.templateAssetsUrl=${shareUrl}/res/components/images/
# shared-link (quickShare) base url
repo.client-app.share.sharedLinkBaseUrl=${shareUrl}/s
# shared-link email template path
repo.client-app.share.sharedLinkTemplatePath=
# reset password request email template path
repo.client-app.share.requestResetPasswordTemplatePath=
# reset password UI page url
repo.client-app.share.resetPasswordPageUrl=${shareUrl}/page/reset-password
# reset password confirmation email template path
repo.client-app.share.confirmResetPasswordTemplatePath=
Note: Any property without a value is ignored, however, a client can’t be registered if all the properties of that client have no values.
For more information, see Configuring customized email templates.
- Configuring customized email templates
In Alfresco Content Services you can customize the emails that are sent by the v1 REST API when users share links to content and request a password change.
Configuring customized email templates
In Alfresco Content Services you can customize the emails that are sent by the v1 REST API when users share links to content and request a password change.
To customize an email template for your application, register the application as a new client, then create new email templates using your own branding by adding them to the Data Dictionary.
-
Open Share, and click Repository on the toolbar.
-
Click Data Dictionary then Email Templates.
You can create a folder to store your customized email templates here.
-
Add the required properties to
alfresco-global.properties
.Here is an example implementation for the default Share client that uses the v1 REST APIs.
repo.client-app.share.templateAssetsUrl=${shareUrl}/res/components/images/ repo.client-app.share.sharedLinkBaseUrl=${shareUrl}/s repo.client-app.share.sharedLinkTemplatePath= repo.client-app.share.requestResetPasswordTemplatePath= repo.client-app.share.resetPasswordPageUrl=${shareUrl}/page/reset-password repo.client-app.share.confirmResetPasswordTemplatePath=
Note: Any property without a value is ignored, however, a client can’t be registered if all the properties for that client have no values.
Here is the full list of property settings that you can configure. Note that the expected format of the email template paths (
*TemplatePath
) are similar:Property Description Value sharedLinkTemplatePath
requestResetPasswordTemplatePath
confirmResetPasswordTemplatePath
Define the template path as an XPATH, NodeRef or classpath. | Example: XPATH: app:company_home/app:dictionary/app: email_templates/cm:example-email.ftl |
NodeRef: workspace://SpacesStore/a371fc59-d5ea-4849-a45c-b00c0c0d00ab
Class path: alfresco/templates/quickshare-email-templates/ myapp-template.ftl
templateAssetsUrl |
The URL of the assets for the email template, such as images and logos, used in the HTML template. |
Example: ${shareUrl}/res/components/images/ |
sharedLinkBaseUrl |
The base URL of a page where the registered application displays the shared content. |
Example: ${shareUrl}/s |
For example, to register the application `myapp` to send customized `shared-link` emails, add the following properties to `alfresco-global.properties`:
```
repo.client-app.myapp.sharedLinkTemplatePath=myapp email template path
repo.client-app.myapp.templateAssetsUrl=myapp email template assets url
repo.client-app.myapp.sharedLinkBaseUrl=myapp url
```
> **Note:** If the template path isn't a valid `nodeRef` or `template`, the fallback template for Share is used.
- Restart the Alfresco server.
You can view your registered clients by using a JMX client, located under the ClientsAppsConfigInformation MBean.