Emails - Native module

Sending an email via an automation

await zoolo('mailer').create({ 
    to: 'maxmuster@zoolo.io',
    html: '<h1>Hello Max</h1>,
    subject: 'Hello World',

		... // optional fields
		cc: 'sabine@zoolo.io',
		bcc: 'hermmann@zoolo.io',
		mailboxId: '12345677' // The mailbox that will be used to send this email defaults to the users selected default mailbox
		emailTemplateId: '12323243' //the email template to use for the html rendering
})

Managing mailboxes

Mailboxes can be managed in the user profile extended settings. The Id of a mailbox can be found in the submenu in the right of a mailbox.

Using email templates can be managed on the top right in the email composer view

The Id of an email template can be found in the detail view of an email template.

Variables can be injected into these templates in the known style

// The email template '12333454545'

Dear Mr {{ contact_rel.lastName }},

lorem Ipsum...

The variables are parsed from the body object of the mailer, hence you have to add all data that you use in the email template into the create function of the mailer.

zoolo('mailer').create({
		to: 'maxmuster@zoolo.io',
		contact_rel: {
				lastName: 'Muster'
		},
		emailTemplateId: '12333454545'
})

Last updated