Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The default transfer protocol (SMTP) settings are configured at Configuration > /modules/mail/config/smtp . These setting display the Mail subapp.

...

  • SMTP server: Name of your mail server.
  • Authentication: Select:
    • Authentication with username and password,
      • Username: SMTP user name.
      • Password: SMTP user's password.
    • No authentication required.
  • Security:
    • No encryption for simple SMTP (default communication port is 25).
    • SMTP over SLL (SMTPS, SSL v3) (port 465).
    •  (port 587).
  • Port: Dependent on security setting.

...

  • Access the relevant profile, typically superuser , in the Security app. Go to System users and add your email address in the superuser profile.
  • Select either plain text or rich text mail type.
  • Optionally, select an asset attachments from the DAM in the Assets chooser
  • Click Send Test Mail.

The content of the test mail is configured in /modules/mail/config/simpleConfiguration .

Advanced Tables - Table Plus
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse


Node nameValue

Mgnl f
modules

 

Mgnl f
mail

 

Mgnl f
config

 

Mgnl n
simpleConfiguration

 

Mgnl p
body

This is a simple mail.

Mgnl p
from

test@example.com

Mgnl p
subject

 This This is a test mail.


Message templates

...

Templates are configured in /modules/mail/config/templateConfiguration . The testFreemarker template is provided as an example.

...

Advanced Tables - Table Plus
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse


Node nameValue

Mgnl f
config

 

Mgnl f
templatesConfiguration

 

Mgnl n
testFreemarker

 

Mgnl n
attachments

 

Mgnl n
parameters

 

Mgnl p
contentType

html

Mgnl p
from

testfreemarker@example.com

Mgnl p
subject

 This This is a test email for freemarker template

Mgnl p
templateFile

 testFreemarkertestFreemarker.html

Mgnl p
type

freemarker

Mgnl n
pageCommentsNotification

 


...

templatesConfiguration

required

Templates configuration node.

<template name>

required

Template name.

attachments

optional

Javadoc resource link
rangeHigherVersion5.5
classNameinfo.magnolia.module.mail.templates.MailAttachment
renderTypeasynchronous
 provides provides for a number of attachment options.

parameters

optional

Any parameters to be passed to the script.

templateFile

required

Relative path to the template script. 

type

required

Scripting language used in the template.

contentType

optional

Type of content for the message body. It is only necessary to include this property for HTML emails.

from

optional

Email address that will appear in the From field of the message, unless defined elsewhere, for example in Form module.

subject

optional

Subject line of the email, unless defined elsewhere for example in the Form module.

...

Advanced Tables - Table Plus
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse


Node nameValue

Mgnl f
config

 

Mgnl n
factory

 

Mgnl n
renderers

 

Mgnl p
freemarker

info.magnolia.module.mail.templates.impl.FreemarkerEmail

Mgnl p
magnolia

 infoinfo.magnolia.module.mail.templates.impl.MgnlPageEmail

Mgnl p
simple

 infoinfo.magnolia.module.mail.templates.impl.SimpleEmail

Mgnl p
class

 infoinfo.magnolia.module.mail.MgnlMailFactory


...

This script requires two parameters, user and path , that need to be provided in the Data to send box in the verify templates tool. The parameters are passed to the template script and rendered in the message. Each parameter should be added on a single line in the <parameter name=<value> format. For example:

...

In the attachments node you can define properties for the parameters called by the script. For example, the testFreemarker.html template script references img src="cid:0001" . The cid property identifies the attachment as an image (value={}) and the url property sets the image location.

Advanced Tables - Table Plus
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse


Node nameValue

Mgnl n
testFreemarker

 

Mgnl n
attachments

 

Mgnl n
0001

 

Mgnl p
cid

img

Mgnl p
url

 http://www.magnolia-cms.com/.imaging/amplify-miami-2014/imageForTeaserBinary/miami.png


The mimeMultipart property can be used to define the structure of a

Javadoc resource link
rangeHigherVersion5.5
classNameinfo.magnolia.module.mail.templates.MgnlMultipartEmail
renderTypeasynchronous
 :

Advanced Tables - Table Plus
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse


Node nameValue

Mgnl n
<template configuration>

 

Mgnl n
attachments

 

Mgnl n
<attachment name>

 

Mgnl p
mimeMultipart

mixed

Mgnl p
url

 http://www.magnolia-cms.com/.imaging/amplify-miami-2014/imageForTeaserBinary/miami.png

Mgnl n
<attachment name>

 

Mgnl p
mimeMultipart

related

Mgnl p
url

 http://www.magnolia-cms.com/.imaging/amplify-miami-2014/imageForTeaserBinary/miami.png


...