Sending a testing emails
When clicks a send button inside Top Bar in editor preview, Topol converts the template to HTML and returns everything you need to send a test email.
const TOPOL_OPTIONS = {
callbacks: {
onTestSend(email, json, html) {
// send an testing email using your sender of choice
},
},
};
Sending test email to multiple email addresses.
We provide an option to send test emails to multiple email addresses.
You can enable this option inside Topol Options.
INFO
When this option is enabled email
in the callback is always an array of emails, even when only one email is selected.
Emails saved in local storage
You can set the testingEmails
to true
testing emails will be automatically stored in Local storage providing partial persistency.
testingEmails: true;
Managing saving emails yourself
You can set the testingEmails
to be an array of emails provided to the editor max of 5 email addresses.
testingEmails: ["user1@example.test", "user2@example.test"];
User then selects emails to send a testing emails to.
When user edits the email list updateTestingEmailAddresses
is fired providing new list of emails.
const TOPOL_OPTIONS = {
callbacks: {
updateTestingEmailAddresses(emails) {
// save updated emails to DB
},
},
};